/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id$ * * mpegplayer main entrypoint and UI implementation * * Copyright (c) 2007 Michael Sevakis * * 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 2 * of the License, or (at your option) any later version. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/ /**************************************************************************** * NOTES: * * mpegplayer is structured as follows: * * +-->Video Thread-->Video Output-->LCD * | * UI-->Stream Manager-->+-->Audio Thread-->PCM buffer--Audio Device * | | | | (ref. clock) * | | +-->Buffer Thread | * Stream Data | | (clock intf./ * Requests | File Cache drift adj.) * | Disk I/O * Stream services * (timing, etc.) * * Thread list: * 1) The main thread - Handles user input, settings, basic playback control * and USB connect. * * 2) Stream Manager thread - Handles playback state, events from streams * such as when a stream is finished, stream commands, PCM state. The * layer in which this thread run also handles arbitration of data * requests between the streams and the disk buffer. The actual specific * transport layer code may get moved out to support multiple container * formats. * * 3) Buffer thread - Buffers data in the background, generates notifications * to streams when their data has been buffered, and watches streams' * progress to keep data available during playback. Handles synchronous * random access requests when the file cache is missed. * * 4) Video thread (running on the COP for PortalPlayer targets) - Decodes * the video stream and renders video frames to the LCD. Handles * miscellaneous video tasks like frame and thumbnail printing. * * 5) Audio thread (running on the main CPU to maintain consistency with the * audio FIQ hander on PP) - Decodes audio frames and places them into * the PCM buffer for rendering by the audio device. * * Streams are neither aware of one another nor care about one another. All * streams shall have their own thread (unless it is _really_ efficient to * have a single thread handle a couple minor streams). All coordination of * the streams is done through the stream manager. The clocking is controlled * by and exposed by the stream manager to other streams and implemented at * the PCM level. * * Notes about MPEG files: * * MPEG System Clock is 27MHz - i.e. 27000000 ticks/second. * * FPS is represented in terms of a frame period - this is always an * integer number of 27MHz ticks. * * e.g. 29.97fps (30000/1001) NTSC video has an exact frame period of * 900900 27MHz ticks. * * In libmpeg2, info->sequence->frame_period contains the frame_period. * * Working with Rockbox's 100Hz tick, the common frame rates would need * to be as follows (1): * * FPS | 27Mhz | 100Hz | 44.1KHz | 48KHz * --------|----------------------------------------------------------- * 10* | 2700000 | 10 | 4410 | 4800 * 12* | 2250000 | 8.3333 | 3675 | 4000 * 15* | 1800000 | 6.6667 | 2940 | 3200 * 23.9760 | 1126125 | 4.170833333 | 1839.3375 | 2002 * 24 | 1125000 | 4.166667 | 1837.5 | 2000 * 25 | 1080000 | 4 | 1764 | 1920 * 29.9700 | 900900 | 3.336667 | 1471,47 | 1601.6 * 30 | 900000 | 3.333333 | 1470 | 1600 * * *Unofficial framerates * * (1) But we don't really care since the audio clock is used anyway and has * very fine resolution ;-) *****************************************************************************/ #include "plugin.h" #include "mpegplayer.h" #include "lib/helper.h" #include "mpeg_settings.h" #include "mpeg2.h" #include "video_out.h" #include "stream_thread.h" #include "stream_mgr.h" PLUGIN_HEADER PLUGIN_IRAM_DECLARE /* button definitions */ #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) #define MPEG_MENU BUTTON_MODE #define MPEG_STOP BUTTON_OFF #define MPEG_PAUSE BUTTON_ON #define MPEG_VOLDOWN BUTTON_DOWN #define MPEG_VOLUP BUTTON_UP #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \ (CONFIG_KEYPAD == IPOD_1G2G_PAD) #define MPEG_MENU BUTTON_MENU #define MPEG_PAUSE (BUTTON_PLAY | BUTTON_REL) #define MPEG_STOP (BUTTON_PLAY | BUTTON_REPEAT) #define MPEG_VOLDOWN BUTTON_SCROLL_BACK #define MPEG_VOLUP BUTTON_SCROLL_FWD #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD #define MPEG_MENU (BUTTON_REC | BUTTON_REL) #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_PLAY #define MPEG_VOLDOWN BUTTON_DOWN #define MPEG_VOLUP BUTTON_UP #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == GIGABEAT_PAD #define MPEG_MENU BUTTON_MENU #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_SELECT #define MPEG_PAUSE2 BUTTON_A #define MPEG_VOLDOWN BUTTON_LEFT #define MPEG_VOLUP BUTTON_RIGHT #define MPEG_VOLDOWN2 BUTTON_VOL_DOWN #define MPEG_VOLUP2 BUTTON_VOL_UP #define MPEG_RW BUTTON_UP #define MPEG_FF BUTTON_DOWN #define MPEG_RC_MENU BUTTON_RC_DSP #define MPEG_RC_STOP (BUTTON_RC_PLAY | BUTTON_REPEAT) #define MPEG_RC_PAUSE (BUTTON_RC_PLAY | BUTTON_REL) #define MPEG_RC_VOLDOWN BUTTON_RC_VOL_DOWN #define MPEG_RC_VOLUP BUTTON_RC_VOL_UP #define MPEG_RC_RW BUTTON_RC_REW #define MPEG_RC_FF BUTTON_RC_FF #elif CONFIG_KEYPAD == GIGABEAT_S_PAD #define MPEG_MENU BUTTON_MENU #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_SELECT #define MPEG_PAUSE2 BUTTON_PLAY #define MPEG_VOLDOWN BUTTON_LEFT #define MPEG_VOLUP BUTTON_RIGHT #define MPEG_VOLDOWN2 BUTTON_VOL_DOWN #define MPEG_VOLUP2 BUTTON_VOL_UP #define MPEG_RW BUTTON_UP #define MPEG_FF BUTTON_DOWN #define MPEG_RC_MENU BUTTON_RC_DSP #define MPEG_RC_STOP (BUTTON_RC_PLAY | BUTTON_REPEAT) #define MPEG_RC_PAUSE (BUTTON_RC_PLAY | BUTTON_REL) #define MPEG_RC_VOLDOWN BUTTON_RC_VOL_DOWN #define MPEG_RC_VOLUP BUTTON_RC_VOL_UP #define MPEG_RC_RW BUTTON_RC_REW #define MPEG_RC_FF BUTTON_RC_FF #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define MPEG_MENU BUTTON_LEFT #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_PLAY #define MPEG_VOLDOWN BUTTON_SCROLL_DOWN #define MPEG_VOLUP BUTTON_SCROLL_UP #define MPEG_RW BUTTON_REW #define MPEG_FF BUTTON_FF #elif CONFIG_KEYPAD == SANSA_E200_PAD #define MPEG_MENU BUTTON_SELECT #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_RIGHT #define MPEG_VOLDOWN BUTTON_SCROLL_BACK #define MPEG_VOLUP BUTTON_SCROLL_FWD #define MPEG_RW BUTTON_UP #define MPEG_FF BUTTON_DOWN #elif CONFIG_KEYPAD == SANSA_FUZE_PAD #define MPEG_MENU BUTTON_SELECT #define MPEG_STOP (BUTTON_HOME|BUTTON_REPEAT) #define MPEG_PAUSE BUTTON_UP #define MPEG_VOLDOWN BUTTON_SCROLL_BACK #define MPEG_VOLUP BUTTON_SCROLL_FWD #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == SANSA_C200_PAD || \ CONFIG_KEYPAD == SANSA_CLIP_PAD || \ CONFIG_KEYPAD == SANSA_M200_PAD #define MPEG_MENU BUTTON_SELECT #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_UP #define MPEG_VOLDOWN BUTTON_VOL_DOWN #define MPEG_VOLUP BUTTON_VOL_UP #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == MROBE500_PAD #define MPEG_STOP BUTTON_POWER #define MPEG_RC_MENU BUTTON_RC_HEART #define MPEG_RC_STOP BUTTON_RC_DOWN #define MPEG_RC_PAUSE BUTTON_RC_PLAY #define MPEG_RC_VOLDOWN BUTTON_RC_VOL_DOWN #define MPEG_RC_VOLUP BUTTON_RC_VOL_UP #define MPEG_RC_RW BUTTON_RC_REW #define MPEG_RC_FF BUTTON_RC_FF #elif CONFIG_KEYPAD == MROBE100_PAD #define MPEG_MENU BUTTON_MENU #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_PLAY #define MPEG_VOLDOWN BUTTON_DOWN #define MPEG_VOLUP BUTTON_UP #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == IAUDIO_M3_PAD #define MPEG_MENU BUTTON_RC_MENU #define MPEG_STOP BUTTON_RC_REC #define MPEG_PAUSE BUTTON_RC_PLAY #define MPEG_VOLDOWN BUTTON_RC_VOL_DOWN #define MPEG_VOLUP BUTTON_RC_VOL_UP #define MPEG_RW BUTTON_RC_REW #define MPEG_FF BUTTON_RC_FF #elif CONFIG_KEYPAD == COWOND2_PAD #define MPEG_MENU (BUTTON_MENU|BUTTON_REL) //#define MPEG_STOP BUTTON_POWER #define MPEG_VOLDOWN BUTTON_MINUS #define MPEG_VOLUP BUTTON_PLUS #elif CONFIG_KEYPAD == IAUDIO67_PAD #define MPEG_MENU BUTTON_MENU #define MPEG_STOP BUTTON_STOP #define MPEG_PAUSE BUTTON_PLAY #define MPEG_VOLDOWN BUTTON_VOLDOWN #define MPEG_VOLUP BUTTON_VOLUP #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == CREATIVEZVM_PAD #define MPEG_MENU BUTTON_MENU #define MPEG_STOP BUTTON_BACK #define MPEG_PAUSE BUTTON_PLAY #define MPEG_VOLDOWN BUTTON_UP #define MPEG_VOLUP BUTTON_DOWN #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD #define MPEG_MENU BUTTON_MENU #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_SELECT #define MPEG_VOLDOWN BUTTON_VOL_DOWN #define MPEG_VOLUP BUTTON_VOL_UP #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT #elif CONFIG_KEYPAD == ONDAVX747_PAD #define MPEG_MENU (BUTTON_MENU|BUTTON_REL) //#define MPEG_STOP BUTTON_POWER #define MPEG_VOLDOWN BUTTON_VOL_DOWN #define MPEG_VOLUP BUTTON_VOL_UP #else #error No keymap defined! #endif #ifdef HAVE_TOUCHSCREEN #ifndef MPEG_MENU #define MPEG_MENU (BUTTON_TOPRIGHT|BUTTON_REL) #endif #ifndef MPEG_STOP #define MPEG_STOP BUTTON_TOPLEFT #endif #ifndef MPEG_PAUSE #define MPEG_PAUSE BUTTON_CENTER #endif #ifndef MPEG_VOLDOWN #define MPEG_VOLDOWN BUTTON_BOTTOMMIDDLE #endif #ifndef MPEG_VOLUP #define MPEG_VOLUP BUTTON_TOPMIDDLE #endif #ifndef MPEG_RW #define MPEG_RW BUTTON_MIDLEFT #endif #ifndef MPEG_FF #define MPEG_FF BUTTON_MIDRIGHT #endif #endif /* One thing we can do here for targets with remotes is having a display * always on the remote instead of always forcing a popup on the main display */ #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ /* 3% of 30min file == 54s step size */ #define MIN_FF_REWIND_STEP (TS_SECOND/2) #define WVS_MIN_UPDATE_INTERVAL (HZ/2) /* WVS status - same order as icon array */ enum wvs_status_enum { WVS_STATUS_STOPPED = 0, WVS_STATUS_PAUSED, WVS_STATUS_PLAYING, WVS_STATUS_FF, WVS_STATUS_RW, WVS_STATUS_COUNT, WVS_STATUS_MASK = 0x7 }; enum wvs_bits { WVS_REFRESH_DEFAULT = 0x0000, /* Only refresh elements when due */ /* Refresh the... */ WVS_REFRESH_VOLUME = 0x0001, /* ...volume display */ WVS_REFRESH_TIME = 0x0002, /* ...time display+progress */ WVS_REFRESH_STATUS = 0x0004, /* ...playback status icon */ WVS_REFRESH_BACKGROUND = 0x0008, /* ...background (implies ALL) */ WVS_REFRESH_VIDEO = 0x0010, /* ...video image upon timeout */ WVS_REFRESH_RESUME = 0x0020, /* Resume playback upon timeout */ WVS_NODRAW = 0x8000, /* OR bitflag - don't draw anything */ WVS_SHOW = 0x4000, /* OR bitflag - show the WVS */ WVS_HP_PAUSE = 0x2000, WVS_HIDE = 0x0000, /* hide the WVS (aid readability) */ WVS_REFRESH_ALL = 0x000f, /* Only immediate graphical elements */ }; /* Status icons selected according to font height */ extern const unsigned char mpegplayer_status_icons_8x8x1[]; extern const unsigned char mpegplayer_status_icons_12x12x1[]; extern const unsigned char mpegplayer_status_icons_16x16x1[]; /* Main border areas that contain WVS elements */ #define WVS_BDR_L 2 #define WVS_BDR_T 2 #define WVS_BDR_R 2 #define WVS_BDR_B 2 struct wvs { long hide_tick; long show_for; long print_tick; long print_delay; long resume_tick; long resume_delay; long next_auto_refresh; int x; int y; int width; int height; unsigned fgcolor; unsigned bgcolor; unsigned prog_fillcolor; struct vo_rect update_rect; struct vo_rect prog_rect; struct vo_rect time_rect; struct vo_rect dur_rect; struct vo_rect vol_rect; const unsigned char *icons; struct vo_rect stat_rect; int status; uint32_t curr_time; unsigned auto_refresh; unsigned flags; }; static struct wvs wvs; static void wvs_show(unsigned show); #ifdef LCD_LANDSCAPE #define _X (x + wvs.x) #define _Y (y + wvs.y) #define _W width #define _H height #else #define _X (LCD_WIDTH - (y + wvs.y) - height) #define _Y (x + wvs.x) #define _W height #define _H width #endif #ifdef HAVE_LCD_COLOR /* Blend two colors in 0-100% (0-255) mix of c2 into c1 */ static unsigned draw_blendcolor(unsigned c1, unsigned c2, unsigned char amount) { int r1 = RGB_UNPACK_RED(c1); int g1 = RGB_UNPACK_GREEN(c1); int b1 = RGB_UNPACK_BLUE(c1); int r2 = RGB_UNPACK_RED(c2); int g2 = RGB_UNPACK_GREEN(c2); int b2 = RGB_UNPACK_BLUE(c2); return LCD_RGBPACK(amount*(r2 - r1) / 255 + r1, amount*(g2 - g1) / 255 + g1, amount*(b2 - b1) / 255 + b1); } #endif /* Drawing functions that operate rotated on LCD_PORTRAIT displays - * most are just wrappers of lcd_* functions with transforms applied. * The origin is the upper-left corner of the WVS area */ static void draw_update_rect(int x, int y, int width, int height) { lcd_(update_rect)(_X, _Y, _W, _H); } static void draw_clear_area(int x, int y, int width, int height) { #ifdef HAVE_LCD_COLOR rb->screen_clear_area(rb->screens[SCREEN_MAIN], _X, _Y, _W, _H); #else int oldmode = grey_get_drawmode(); grey_set_drawmode(DRMODE_SOLID | DRMODE_INVERSEVID); grey_fillrect(_X, _Y, _W, _H); grey_set_drawmode(oldmode); #endif } static void draw_clear_area_rect(const struct vo_rect *rc) { int x = rc->l; int y = rc->t; int width = rc->r - rc->l; int height = rc->b - rc->t; #ifdef HAVE_LCD_COLOR rb->screen_clear_area(rb->screens[SCREEN_MAIN], _X, _Y, _W, _H); #else int oldmode = grey_get_drawmode(); grey_set_drawmode(DRMODE_SOLID | DRMODE_INVERSEVID); grey_fillrect(_X, _Y, _W, _H); grey_set_drawmode(oldmode); #endif } static void draw_fillrect(int x, int y, int width, int height) { lcd_(fillrect)(_X, _Y, _W, _H); } static void draw_hline(int x1, int x2, int y) { #ifdef LCD_LANDSCAPE lcd_(hline)(x1 + wvs.x, x2 + wvs.x, y + wvs.y); #else y = LCD_WIDTH - (y + wvs.y) - 1; lcd_(vline)(y, x1 + wvs.x, x2 + wvs.x); #endif } static void draw_vline(int x, int y1, int y2) { #ifdef LCD_LANDSCAPE lcd_(vline)(x + wvs.x, y1 + wvs.y, y2 + wvs.y); #else y1 = LCD_WIDTH - (y1 + wvs.y) - 1; y2 = LCD_WIDTH - (y2 + wvs.y) - 1; lcd_(hline)(y1, y2, x + wvs.x); #endif } static void draw_scrollbar_draw(int x, int y, int width, int height, uint32_t min, uint32_t max, uint32_t val) { unsigned oldfg = lcd_(get_foreground)(); draw_hline(x + 1, x + width - 2, y); draw_hline(x + 1, x + width - 2, y + height - 1); draw_vline(x, y + 1, y + height - 2); draw_vline(x + width - 1, y + 1, y + height - 2); val = muldiv_uint32(width - 2, val, max - min); val = MIN(val, (uint32_t)(width - 2)); draw_fillrect(x + 1, y + 1, val, height - 2); lcd_(set_foreground)(wvs.prog_fillcolor); draw_fillrect(x + 1 + val, y + 1, width - 2 - val, height - 2); lcd_(set_foreground)(oldfg); } static void draw_scrollbar_draw_rect(const struct vo_rect *rc, int min, int max, int val) { draw_scrollbar_draw(rc->l, rc->t, rc->r - rc->l, rc->b - rc->t, min, max, val); } #ifdef LCD_PORTRAIT /* Portrait displays need rotated text rendering */ /* Limited function that only renders in DRMODE_FG and uses absolute screen * coordinates */ static void draw_oriented_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height) { const unsigned char *src_end; fb_data *dst, *dst_end; unsigned fg_pattern, bg_pattern; if (x + width > SCREEN_WIDTH) width = SCREEN_WIDTH - x; /* Clip right */ if (x < 0) width += x, x = 0; /* Clip left */ if (width <= 0) return; /* nothing left to do */ if (y + height > SCREEN_HEIGHT) height = SCREEN_HEIGHT - y; /* Clip bottom */ if (y < 0) height += y, y = 0; /* Clip top */ if (height <= 0) return; /* nothing left to do */ fg_pattern = rb->lcd_get_foreground(); bg_pattern = rb->lcd_get_background(); src += stride * (src_y >> 3) + src_x; /* move starting point */ src_y &= 7; src_end = src + width; dst = rb->lcd_framebuffer + (LCD_WIDTH - y) + x*LCD_WIDTH; do { const unsigned char *src_col = src++; unsigned data = *src_col >> src_y; int numbits = 8 - src_y; fb_data *dst_col = dst; dst_end = dst_col - height; dst += LCD_WIDTH; do { dst_col--; if (data & 1) *dst_col = fg_pattern; #if 0 else *dst_col = bg_pattern; #endif data >>= 1; if (--numbits == 0) { src_col += stride; data = *src_col; numbits = 8; } } while (dst_col > dst_end); } while (src < src_end); } static void draw_putsxy_oriented(int x, int y, const char *str) { unsigned short ch; unsigned short *ucs; int ofs = MIN(x, 0); struct font* pf = rb->font_get(FONT_UI); ucs = rb->bidi_l2v(str, 1); x += wvs.x; y += wvs.y; while ((ch = *ucs++) != 0 && x < SCREEN_WIDTH) { int width; const unsigned char *bits; /* get proportional width and glyph bits */ width = rb->font_get_width(pf, ch); if (ofs > width) { ofs -= width; continue; } bits = rb->font_get_bits(pf, ch); draw_oriented_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height); x += width - ofs; ofs = 0; } } #else static void draw_oriented_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height) { int mode = lcd_(get_drawmode)(); lcd_(set_drawmode)(DRMODE_FG); lcd_(mono_bitmap_part)(src, src_x, src_y, stride, x, y, width, height); lcd_(set_drawmode)(mode); } static void draw_putsxy_oriented(int x, int y, const char *str) { int mode = lcd_(get_drawmode)(); lcd_(set_drawmode)(DRMODE_FG); lcd_(putsxy)(x + wvs.x, y + wvs.y, str); lcd_(set_drawmode)(mode); } #endif /* LCD_PORTRAIT */ #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) /* So we can refresh the overlay */ static void wvs_lcd_enable_hook(void) { rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_1, 0); } #endif static void wvs_backlight_on_video_mode(bool video_on) { if (video_on) { /* Turn off backlight timeout */ /* backlight control in lib/helper.c */ backlight_force_on(); #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) rb->lcd_activation_set_hook(NULL); #endif } else { #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) rb->lcd_activation_set_hook(wvs_lcd_enable_hook); #endif /* Revert to user's backlight settings */ backlight_use_settings(); } } #ifdef HAVE_BACKLIGHT_BRIGHTNESS static void wvs_backlight_brightness_video_mode(bool video_on) { if (settings.backlight_brightness < 0) return; mpeg_backlight_update_brightness( video_on ? settings.backlight_brightness : -1); } #else #define wvs_backlight_brightness_video_mode(video_on) #endif /* HAVE_BACKLIGHT_BRIGHTNESS */ static void wvs_text_init(void) { struct hms hms; char buf[32]; int phys; int spc_width; lcd_(setfont)(FONT_UI); wvs.x = 0; wvs.width = SCREEN_WIDTH; vo_rect_clear(&wvs.time_rect); vo_rect_clear(&wvs.stat_rect); vo_rect_clear(&wvs.prog_rect); vo_rect_clear(&wvs.vol_rect); ts_to_hms(stream_get_duration(), &hms); hms_format(buf, sizeof (buf), &hms); lcd_(getstringsize)(buf, &wvs.time_rect.r, &wvs.time_rect.b); /* Choose well-sized bitmap images relative to font height */ if (wvs.time_rect.b < 12) { wvs.icons = mpegplayer_status_icons_8x8x1; wvs.stat_rect.r = wvs.stat_rect.b = 8; } else if (wvs.time_rect.b < 16) { wvs.icons = mpegplayer_status_icons_12x12x1; wvs.stat_rect.r = wvs.stat_rect.b = 12; } else { wvs.icons = mpegplayer_status_icons_16x16x1; wvs.stat_rect.r = wvs.stat_rect.b = 16; } if (wvs.stat_rect.b < wvs.time_rect.b) { vo_rect_offset(&wvs.stat_rect, 0, (wvs.time_rect.b - wvs.stat_rect.b) / 2 + WVS_BDR_T); vo_rect_offset(&wvs.time_rect, WVS_BDR_L, WVS_BDR_T); } else { vo_rect_offset(&wvs.time_rect, WVS_BDR_L, wvs.stat_rect.b - wvs.time_rect.b + WVS_BDR_T); vo_rect_offset(&wvs.stat_rect, 0, WVS_BDR_T); } wvs.dur_rect = wvs.time_rect; phys = rb->sound_val2phys(SOUND_VOLUME, rb->sound_min(SOUND_VOLUME)); rb->snprintf(buf, sizeof(buf), "%d%s", phys, rb->sound_unit(SOUND_VOLUME)); lcd_(getstringsize)(" ", &spc_width, NULL); lcd_(getstringsize)(buf, &wvs.vol_rect.r, &wvs.vol_rect.b); wvs.prog_rect.r = SCREEN_WIDTH - WVS_BDR_L - spc_width - wvs.vol_rect.r - WVS_BDR_R; wvs.prog_rect.b = 3*wvs.stat_rect.b / 4; vo_rect_offset(&wvs.prog_rect, wvs.time_rect.l, wvs.time_rect.b); vo_rect_offset(&wvs.stat_rect, (wvs.prog_rect.r + wvs.prog_rect.l - wvs.stat_rect.r) / 2, 0); vo_rect_offset(&wvs.dur_rect, wvs.prog_rect.r - wvs.dur_rect.r, 0); vo_rect_offset(&wvs.vol_rect, wvs.prog_rect.r + spc_width, (wvs.prog_rect.b + wvs.prog_rect.t - wvs.vol_rect.b) / 2); wvs.height = WVS_BDR_T + MAX(wvs.prog_rect.b, wvs.vol_rect.b) - MIN(wvs.time_rect.t, wvs.stat_rect.t) + WVS_BDR_B; #ifdef HAVE_LCD_COLOR wvs.height = ALIGN_UP(wvs.height, 2); #endif wvs.y = SCREEN_HEIGHT - wvs.height; lcd_(setfont)(FONT_SYSFIXED); } static void wvs_init(void) { wvs.flags = 0; wvs.show_for = HZ*4; wvs.print_delay = 75*HZ/100; wvs.resume_delay = HZ/2; #ifdef HAVE_LCD_COLOR wvs.bgcolor = LCD_RGBPACK(0x73, 0x75, 0xbd); wvs.fgcolor = LCD_WHITE; wvs.prog_fillcolor = LCD_BLACK; #else wvs.bgcolor = GREY_LIGHTGRAY; wvs.fgcolor = GREY_BLACK; wvs.prog_fillcolor = GREY_WHITE; #endif wvs.curr_time = 0; wvs.status = WVS_STATUS_STOPPED; wvs.auto_refresh = WVS_REFRESH_TIME; wvs.next_auto_refresh = *rb->current_tick; wvs_text_init(); } static void wvs_schedule_refresh(unsigned refresh) { long tick = *rb->current_tick; if (refresh & WVS_REFRESH_VIDEO) wvs.print_tick = tick + wvs.print_delay; if (refresh & WVS_REFRESH_RESUME) wvs.resume_tick = tick + wvs.resume_delay; wvs.auto_refresh |= refresh; } static void wvs_cancel_refresh(unsigned refresh) { wvs.auto_refresh &= ~refresh; } /* Refresh the background area */ static void wvs_refresh_background(void) { char buf[32]; struct hms hms; unsigned bg = lcd_(get_background)(); lcd_(set_drawmode)(DRMODE_SOLID | DRMODE_INVERSEVID); #ifdef HAVE_LCD_COLOR /* Draw a "raised" area for our graphics */ lcd_(set_background)(draw_blendcolor(bg, DRAW_WHITE, 192)); draw_hline(0, wvs.width, 0); lcd_(set_background)(draw_blendcolor(bg, DRAW_WHITE, 80)); draw_hline(0, wvs.width, 1); lcd_(set_background)(draw_blendcolor(bg, DRAW_BLACK, 48)); draw_hline(0, wvs.width, wvs.height-2); lcd_(set_background)(draw_blendcolor(bg, DRAW_BLACK, 128)); draw_hline(0, wvs.width, wvs.height-1); lcd_(set_background)(bg); draw_clear_area(0, 2, wvs.width, wvs.height - 4); #else /* Give contrast with the main background */ lcd_(set_background)(GREY_WHITE); draw_hline(0, wvs.width, 0); lcd_(set_background)(GREY_DARKGRAY); draw_hline(0, wvs.width, wvs.height-1); lcd_(set_background)(bg); draw_clear_area(0, 1, wvs.width, wvs.height - 2); #endif vo_rect_set_ext(&wvs.update_rect, 0, 0, wvs.width, wvs.height); lcd_(set_drawmode)(DRMODE_SOLID); if (stream_get_duration() != INVALID_TIMESTAMP) { /* Draw the movie duration */ ts_to_hms(stream_get_duration(), &hms); hms_format(buf, sizeof (buf), &hms); draw_putsxy_oriented(wvs.dur_rect.l, wvs.dur_rect.t, buf); } /* else don't know the duration */ } /* Refresh the current time display + the progress bar */ static void wvs_refresh_time(void) { char buf[32]; struct hms hms; uint32_t duration = stream_get_duration(); draw_scrollbar_draw_rect(&wvs.prog_rect, 0, duration, wvs.curr_time); ts_to_hms(wvs.curr_time, &hms); hms_format(buf, sizeof (buf), &hms); draw_clear_area_rect(&wvs.time_rect); draw_putsxy_oriented(wvs.time_rect.l, wvs.time_rect.t, buf); vo_rect_union(&wvs.update_rect, &wvs.update_rect, &wvs.prog_rect); vo_rect_union(&wvs.update_rect, &wvs.update_rect, &wvs.time_rect); } /* Refresh the volume display area */ static void wvs_refresh_volume(void) { char buf[32]; int width; int volume = rb->global_settings->volume; rb->snprintf(buf, sizeof (buf), "%d%s", rb->sound_val2phys(SOUND_VOLUME, volume), rb->sound_unit(SOUND_VOLUME)); lcd_(getstringsize)(buf, &width, NULL); /* Right-justified */ draw_clear_area_rect(&wvs.vol_rect); draw_putsxy_oriented(wvs.vol_rect.r - width, wvs.vol_rect.t, buf); vo_rect_union(&wvs.update_rect, &wvs.update_rect, &wvs.vol_rect); } /* Refresh the status icon */ static void wvs_refresh_status(void) { int icon_size = wvs.stat_rect.r - wvs.stat_rect.l; draw_clear_area_rect(&wvs.stat_rect); #ifdef HAVE_LCD_COLOR /* Draw status icon with a drop shadow */ unsigned oldfg = lcd_(get_foreground)(); int i = 1; lcd_(set_foreground)(draw_blendcolor(lcd_(get_background)(), DRAW_BLACK, 96)); while (1) { draw_oriented_mono_bitmap_part(wvs.icons, icon_size*wvs.status, 0, icon_size*WVS_STATUS_COUNT, wvs.stat_rect.l + wvs.x + i, wvs.stat_rect.t + wvs.y + i, icon_size, icon_size); if (--i < 0) break; lcd_(set_foreground)(oldfg); } vo_rect_union(&wvs.update_rect, &wvs.update_rect, &wvs.stat_rect); #else draw_oriented_mono_bitmap_part(wvs.icons, icon_size*wvs.status, 0, icon_size*WVS_STATUS_COUNT, wvs.stat_rect.l + wvs.x, wvs.stat_rect.t + wvs.y, icon_size, icon_size); vo_rect_union(&wvs.update_rect, &wvs.update_rect, &wvs.stat_rect); #endif } /* Update the current status which determines which icon is displayed */ static bool wvs_update_status(void) { int status; switch (stream_status()) { default: status = WVS_STATUS_STOPPED; break; case STREAM_PAUSED: /* If paused with a pending resume, coerce it to WVS_STATUS_PLAYING */ status = (wvs.auto_refresh & WVS_REFRESH_RESUME) ? WVS_STATUS_PLAYING : WVS_STATUS_PAUSED; break; case STREAM_PLAYING: status = WVS_STATUS_PLAYING; break; } if (status != wvs.status) { /* A refresh is needed */ wvs.status = status; return true; } return false; } /* Update the current time that will be displayed */ static void wvs_update_time(void) { uint32_t start; wvs.curr_time = stream_get_seek_time(&start); wvs.curr_time -= start; } /* Refresh various parts of the WVS - showing it if it is hidden */ static void wvs_refresh(int hint) { long tick; unsigned oldbg, oldfg; tick = *rb->current_tick; if (hint == WVS_REFRESH_DEFAULT) { /* The default which forces no updates */ /* Make sure Rockbox doesn't turn off the player because of too little activity */ if (wvs.status == WVS_STATUS_PLAYING) rb->reset_poweroff_timer(); /* Redraw the current or possibly extract a new video frame */ if ((wvs.auto_refresh & WVS_REFRESH_VIDEO) && TIME_AFTER(tick, wvs.print_tick)) { wvs.auto_refresh &= ~WVS_REFRESH_VIDEO; stream_draw_frame(false); } /* Restart playback if the timout was reached */ if ((wvs.auto_refresh & WVS_REFRESH_RESUME) && TIME_AFTER(tick, wvs.resume_tick)) { wvs.auto_refresh &= ~(WVS_REFRESH_RESUME | WVS_REFRESH_VIDEO); stream_resume(); } /* If not visible, return */ if (!(wvs.flags & WVS_SHOW)) return; /* Hide if the visibility duration was reached */ if (TIME_AFTER(tick, wvs.hide_tick)) { wvs_show(WVS_HIDE); return; } } else { /* A forced update of some region */ /* Show if currently invisible */ if (!(wvs.flags & WVS_SHOW)) { /* Avoid call back into this function - it will be drawn */ wvs_show(WVS_SHOW | WVS_NODRAW); hint = WVS_REFRESH_ALL; } /* Move back timeouts for frame print and hide */ wvs.print_tick = tick + wvs.print_delay; wvs.hide_tick = tick + wvs.show_for; } if (TIME_AFTER(tick, wvs.next_auto_refresh)) { /* Refresh whatever graphical elements are due automatically */ wvs.next_auto_refresh = tick + WVS_MIN_UPDATE_INTERVAL; if (wvs.auto_refresh & WVS_REFRESH_STATUS) { if (wvs_update_status()) hint |= WVS_REFRESH_STATUS; } if (wvs.auto_refresh & WVS_REFRESH_TIME) { wvs_update_time(); hint |= WVS_REFRESH_TIME; } } if (hint == 0) return; /* No drawing needed */ /* Set basic drawing params that are used. Elements that perform variations * will restore them. */ oldfg = lcd_(get_foreground)(); oldbg = lcd_(get_background)(); lcd_(setfont)(FONT_UI); lcd_(set_foreground)(wvs.fgcolor); lcd_(set_background)(wvs.bgcolor); vo_rect_clear(&wvs.update_rect); if (hint & WVS_REFRESH_BACKGROUND) { wvs_refresh_background(); hint |= WVS_REFRESH_ALL; /* Requires a redraw of everything */ } if (hint & WVS_REFRESH_TIME) { wvs_refresh_time(); } if (hint & WVS_REFRESH_VOLUME) { wvs_refresh_volume(); } if (hint & WVS_REFRESH_STATUS) { wvs_refresh_status(); } /* Go back to defaults */ lcd_(setfont)(FONT_SYSFIXED); lcd_(set_foreground)(oldfg); lcd_(set_background)(oldbg); /* Update the dirty rectangle */ vo_lock(); draw_update_rect(wvs.update_rect.l, wvs.update_rect.t, wvs.update_rect.r - wvs.update_rect.l, wvs.update_rect.b - wvs.update_rect.t); vo_unlock(); } /* Show/Hide the WVS */ static void wvs_show(unsigned show) { if (((show ^ wvs.flags) & WVS_SHOW) == 0) { if (show & WVS_SHOW) { wvs.hide_tick = *rb->current_tick + wvs.show_for; } return; } if (show & WVS_SHOW) { /* Clip away the part of video that is covered */ struct vo_rect rc = { 0, 0, SCREEN_WIDTH, wvs.y }; wvs.flags |= WVS_SHOW; if (wvs.status != WVS_STATUS_PLAYING) { /* Not playing - set brightness to mpegplayer setting */ wvs_backlight_brightness_video_mode(true); } stream_vo_set_clip(&rc); if (!(show & WVS_NODRAW)) wvs_refresh(WVS_REFRESH_ALL); } else { /* Uncover clipped video area and redraw it */ wvs.flags &= ~WVS_SHOW; draw_clear_area(0, 0, wvs.width, wvs.height); if (!(show & WVS_NODRAW)) { vo_lock(); draw_update_rect(0, 0, wvs.width, wvs.height); vo_unlock(); stream_vo_set_clip(NULL); stream_draw_frame(false); } else { stream_vo_set_clip(NULL); } if (wvs.status != WVS_STATUS_PLAYING) { /* Not playing - restore backlight brightness */ wvs_backlight_brightness_video_mode(false); } } } /* Set the current status - update screen if specified */ static void wvs_set_status(int status) { bool draw = (status & WVS_NODRAW) == 0; status &= WVS_STATUS_MASK; if (wvs.status != status) { wvs.status = status; if (draw) wvs_refresh(WVS_REFRESH_STATUS); } } /* Get the current status value */ static int wvs_get_status(void) { return wvs.status & WVS_STATUS_MASK; } /* Handle Fast-forward/Rewind keys using WPS settings (and some nicked code ;) */ static uint32_t wvs_ff_rw(int btn, unsigned refresh) { unsigned int step = TS_SECOND*rb->global_settings->ff_rewind_min_step; const long ff_rw_accel = (rb->global_settings->ff_rewind_accel + 3); uint32_t start; uint32_t time = stream_get_seek_time(&start); const uint32_t duration = stream_get_duration(); unsigned int max_step = 0; uint32_t ff_rw_count = 0; unsigned status = wvs.status; wvs_cancel_refresh(WVS_REFRESH_VIDEO | WVS_REFRESH_RESUME | WVS_REFRESH_TIME); time -= start; /* Absolute clock => stream-relative */ switch (btn) { case MPEG_FF: #ifdef MPEG_RC_FF case MPEG_RC_FF: #endif wvs_set_status(WVS_STATUS_FF); break; case MPEG_RW: #ifdef MPEG_RC_RW case MPEG_RC_RW: #endif wvs_set_status(WVS_STATUS_RW); break; default: btn = -1; } btn |= BUTTON_REPEAT; while (1) { stream_keep_disk_active(); switch (btn) { case BUTTON_NONE: wvs_refresh(WVS_REFRESH_DEFAULT); break; case MPEG_FF | BUTTON_REPEAT: case MPEG_RW | BUTTON_REPEAT: #ifdef MPEG_RC_FF case MPEG_RC_FF | BUTTON_REPEAT: case MPEG_RC_RW | BUTTON_REPEAT: #endif break; case MPEG_FF | BUTTON_REL: case MPEG_RW | BUTTON_REL: #ifdef MPEG_RC_FF case MPEG_RC_FF | BUTTON_REL: case MPEG_RC_RW | BUTTON_REL: #endif if (wvs.status == WVS_STATUS_FF) time += ff_rw_count; else if (wvs.status == WVS_STATUS_RW) time -= ff_rw_count; /* Fall-through */ case -1: default: wvs_schedule_refresh(refresh); wvs_set_status(status); wvs_schedule_refresh(WVS_REFRESH_TIME); return time; } if (wvs.status == WVS_STATUS_FF) { /* fast forwarding, calc max step relative to end */ max_step = muldiv_uint32(duration - (time + ff_rw_count), FF_REWIND_MAX_PERCENT, 100); } else { /* rewinding, calc max step relative to start */ max_step = muldiv_uint32(time - ff_rw_count, FF_REWIND_MAX_PERCENT, 100); } max_step = MAX(max_step, MIN_FF_REWIND_STEP); if (step > max_step) step = max_step; ff_rw_count += step; /* smooth seeking by multiplying step by: 1 + (2 ^ -accel) */ step += step >> ff_rw_accel; if (wvs.status == WVS_STATUS_FF) { if (duration - time <= ff_rw_count) ff_rw_count = duration - time; wvs.curr_time = time + ff_rw_count; } else { if (time <= ff_rw_count) ff_rw_count = time; wvs.curr_time = time - ff_rw_count; } wvs_refresh(WVS_REFRESH_TIME); btn = rb->button_get_w_tmo(WVS_MIN_UPDATE_INTERVAL); } } static int wvs_status(void) { int status = stream_status(); /* Coerce to STREAM_PLAYING if paused with a pending resume */ if (status == STREAM_PAUSED) { if (wvs.auto_refresh & WVS_REFRESH_RESUME) status = STREAM_PLAYING; } return status; } /* Change the current audio volume by a specified amount */ static void wvs_set_volume(int delta) { int vol = rb->global_settings->volume; int limit; vol += delta; if (delta < 0) { /* Volume down - clip to lower limit */ limit = rb->sound_min(SOUND_VOLUME); if (vol < limit) vol = limit; } else { /* Volume up - clip to upper limit */ limit = rb->sound_max(SOUND_VOLUME); if (vol > limit) vol = limit; } /* Sync the global settings */ if (vol != rb->global_settings->volume) { rb->sound_set(SOUND_VOLUME, vol); rb->global_settings->volume = vol; } /* Update the volume display */ wvs_refresh(WVS_REFRESH_VOLUME); } /* Begin playback at the specified time */ static int wvs_play(uint32_t time) { int retval; wvs_cancel_refresh(WVS_REFRESH_VIDEO | WVS_REFRESH_RESUME); retval = stream_seek(time, SEEK_SET); if (retval >= STREAM_OK) { wvs_backlight_on_video_mode(true); wvs_backlight_brightness_video_mode(true); stream_show_vo(true); retval = stream_play(); if (retval >= STREAM_OK) wvs_set_status(WVS_STATUS_PLAYING | WVS_NODRAW); } return retval; } /* Halt playback - pause engine and return logical state */ static int wvs_halt(void) { int status = stream_pause(); /* Coerce to STREAM_PLAYING if paused with a pending resume */ if (status == STREAM_PAUSED) { if (wvs_get_status() == WVS_STATUS_PLAYING) status = STREAM_PLAYING; } /* Cancel some auto refreshes - caller will restart them if desired */ wvs_cancel_refresh(WVS_REFRESH_VIDEO | WVS_REFRESH_RESUME); /* No backlight fiddling here - callers does the right thing */ return status; } /* Pause playback if playing */ static int wvs_pause(void) { unsigned refresh = wvs.auto_refresh; int status = wvs_halt(); if (status == STREAM_PLAYING && (refresh & WVS_REFRESH_RESUME)) { /* Resume pending - change to a still video frame update */ wvs_schedule_refresh(WVS_REFRESH_VIDEO); } wvs_set_status(WVS_STATUS_PAUSED); wvs_backlight_on_video_mode(false); /* Leave brightness alone and restore it when WVS is hidden */ return status; } /* Resume playback if halted or paused */ static void wvs_resume(void) { /* Cancel video and resume auto refresh - the resyc when starting * playback will perform those tasks */ wvs_backlight_on_video_mode(true); wvs_backlight_brightness_video_mode(true); wvs_cancel_refresh(WVS_REFRESH_VIDEO | WVS_REFRESH_RESUME); wvs_set_status(WVS_STATUS_PLAYING); stream_resume(); } /* Stop playback - remember the resume point if not closed */ static void wvs_stop(void) { uint32_t resume_time; wvs_cancel_refresh(WVS_REFRESH_VIDEO | WVS_REFRESH_RESUME); wvs_set_status(WVS_STATUS_STOPPED | WVS_NODRAW); wvs_show(WVS_HIDE | WVS_NODRAW); stream_stop(); resume_time = stream_get_resume_time(); if (resume_time != INVALID_TIMESTAMP) settings.resume_time = resume_time; wvs_backlight_on_video_mode(false); wvs_backlight_brightness_video_mode(false); } /* Perform a seek if seeking is possible for this stream - if playing, a delay * will be inserted before restarting in case the user decides to seek again */ static void wvs_seek(int btn) { int status; unsigned refresh; uint32_t time; if (!stream_can_seek()) return; /* Halt playback - not strictly nescessary but nice */ status = wvs_halt(); if (status == STREAM_STOPPED) return; wvs_show(WVS_SHOW); if (status == STREAM_PLAYING) refresh = WVS_REFRESH_RESUME; /* delay resume if playing */ else refresh = WVS_REFRESH_VIDEO; /* refresh if paused */ /* Obtain a new playback point */ time = wvs_ff_rw(btn, refresh); /* Tell engine to resume at that time */ stream_seek(time, SEEK_SET); } #ifdef HAVE_HEADPHONE_DETECTION /* Handle SYS_PHONE_PLUGGED/UNPLUGGED */ static void wvs_handle_phone_plug(bool inserted) { if (rb->global_settings->unplug_mode == 0) return; /* Wait for any incomplete state transition to complete first */ stream_wait_status(); int status = wvs_status(); if (inserted) { if (rb->global_settings->unplug_mode > 1) { if (status == STREAM_PAUSED) { wvs_resume(); } } } else { if (status == STREAM_PLAYING) { wvs_pause(); if (stream_can_seek() && rb->global_settings->unplug_rw) { stream_seek(-rb->global_settings->unplug_rw*TS_SECOND, SEEK_CUR); wvs_schedule_refresh(WVS_REFRESH_VIDEO); /* Update time display now */ wvs_update_time(); wvs_refresh(WVS_REFRESH_TIME); } } } } #endif static void button_loop(void) { rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_clear_display(); rb->lcd_update(); #if defined(HAVE_LCD_MODES) #if (HAVE_LCD_MODES & LCD_MODE_YUV) rb->lcd_set_mode(LCD_MODE_YUV); #endif #endif wvs_init(); /* Start playback at the specified starting time */ if (wvs_play(settings.resume_time) < STREAM_OK) { rb->splash(HZ*2, "Playback failed"); return; } /* Gently poll the video player for EOS and handle UI */ while (stream_status() != STREAM_STOPPED) { int button; mpeg_menu_sysevent_clear(); button = rb->button_get_w_tmo(WVS_MIN_UPDATE_INTERVAL); button = mpeg_menu_sysevent_callback(button, NULL); switch (button) { case BUTTON_NONE: { wvs_refresh(WVS_REFRESH_DEFAULT); continue; } /* BUTTON_NONE: */ #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) case LCD_ENABLE_EVENT_1: { /* Draw the current frame if prepared already */ stream_draw_frame(true); break; } /* LCD_ENABLE_EVENT_1: */ #endif case MPEG_VOLUP: case MPEG_VOLUP|BUTTON_REPEAT: #ifdef MPEG_VOLUP2 case MPEG_VOLUP2: case MPEG_VOLUP2|BUTTON_REPEAT: #endif #ifdef MPEG_RC_VOLUP case MPEG_RC_VOLUP: case MPEG_RC_VOLUP|BUTTON_REPEAT: #endif { wvs_set_volume(+1); break; } /* MPEG_VOLUP*: */ case MPEG_VOLDOWN: case MPEG_VOLDOWN|BUTTON_REPEAT: #ifdef MPEG_VOLDOWN2 case MPEG_VOLDOWN2: case MPEG_VOLDOWN2|BUTTON_REPEAT: #endif #ifdef MPEG_RC_VOLDOWN case MPEG_RC_VOLDOWN: case MPEG_RC_VOLDOWN|BUTTON_REPEAT: #endif { wvs_set_volume(-1); break; } /* MPEG_VOLDOWN*: */ case MPEG_MENU: #ifdef MPEG_RC_MENU case MPEG_RC_MENU: #endif { int state = wvs_halt(); /* save previous state */ int result; /* Hide video output */ wvs_show(WVS_HIDE | WVS_NODRAW); stream_show_vo(false); wvs_backlight_brightness_video_mode(false); #if defined(HAVE_LCD_MODES) #if (HAVE_LCD_MODES & LCD_MODE_YUV) rb->lcd_set_mode(LCD_MODE_RGB565); #endif #endif result = mpeg_menu(0); /* The menu can change the font, so restore */ rb->lcd_setfont(FONT_SYSFIXED); switch (result) { case MPEG_MENU_QUIT: wvs_stop(); break; default: #if defined(HAVE_LCD_MODES) #if (HAVE_LCD_MODES & LCD_MODE_YUV) rb->lcd_set_mode(LCD_MODE_YUV); #endif #endif /* If not stopped, show video again */ if (state != STREAM_STOPPED) { wvs_show(WVS_SHOW); stream_show_vo(true); } /* If stream was playing, restart it */ if (state == STREAM_PLAYING) { wvs_resume(); } break; } break; } /* MPEG_MENU: */ case MPEG_STOP: #ifdef MPEG_RC_STOP case MPEG_RC_STOP: #endif case ACTION_STD_CANCEL: { wvs_stop(); break; } /* MPEG_STOP: */ case MPEG_PAUSE: #ifdef MPEG_PAUSE2 case MPEG_PAUSE2: #endif #ifdef MPEG_RC_PAUSE case MPEG_RC_PAUSE: #endif { int status = wvs_status(); if (status == STREAM_PLAYING) { /* Playing => Paused */ wvs_pause(); } else if (status == STREAM_PAUSED) { /* Paused => Playing */ wvs_resume(); } break; } /* MPEG_PAUSE*: */ case MPEG_RW: case MPEG_FF: #ifdef MPEG_RC_RW case MPEG_RC_RW: case MPEG_RC_FF: #endif { wvs_seek(button); break; } /* MPEG_RW: MPEG_FF: */ #ifdef HAVE_HEADPHONE_DETECTION case SYS_PHONE_PLUGGED: case SYS_PHONE_UNPLUGGED: { wvs_handle_phone_plug(button == SYS_PHONE_PLUGGED); break; } /* SYS_PHONE_*: */ #endif default: { rb->default_event_handler(button); break; } /* default: */ } rb->yield(); } /* end while */ wvs_stop(); #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) /* Be sure hook is removed before exiting since the stop will put it * back because of the backlight restore. */ rb->lcd_activation_set_hook(NULL); #endif rb->lcd_setfont(FONT_UI); } enum plugin_status plugin_start(const void* parameter) { int status = PLUGIN_ERROR; /* assume failure */ int result; int err; const char *errstring; if (parameter == NULL) { /* No file = GTFO */ rb->splash(HZ*2, "No File"); return PLUGIN_ERROR; } /* Disable all talking before initializing IRAM */ rb->talk_disable(true); /* Initialize IRAM - stops audio and voice as well */ PLUGIN_IRAM_INIT(rb) #ifdef HAVE_LCD_COLOR rb->lcd_set_backdrop(NULL); rb->lcd_set_foreground(LCD_WHITE); rb->lcd_set_background(LCD_BLACK); #endif rb->lcd_clear_display(); rb->lcd_update(); if (stream_init() < STREAM_OK) { DEBUGF("Could not initialize streams\n"); } else { rb->splash(0, "Loading..."); init_settings((char*)parameter); err = stream_open((char *)parameter); if (err >= STREAM_OK) { /* start menu */ rb->lcd_clear_display(); rb->lcd_update(); result = mpeg_start_menu(stream_get_duration()); if (result != MPEG_START_QUIT) { /* Enter button loop and process UI */ button_loop(); } stream_close(); rb->lcd_clear_display(); rb->lcd_update(); save_settings(); /* Save settings (if they have changed) */ status = PLUGIN_OK; mpeg_menu_sysevent_handle(); } else { DEBUGF("Could not open %s\n", (char*)parameter); switch (err) { case STREAM_UNSUPPORTED: errstring = "Unsupported format"; break; default: errstring = "Error opening file: %d"; } rb->splashf(HZ*2, errstring, err); } } #if defined(HAVE_LCD_MODES) #if (HAVE_LCD_MODES & LCD_MODE_YUV) rb->lcd_set_mode(LCD_MODE_RGB565); #endif #endif stream_exit(); rb->talk_disable(false); return status; } 3 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196
/* Emacs style mode select -*- C++ -*-
*-----------------------------------------------------------------------------
*
*
* PrBoom a Doom port merged with LxDoom and LSDLDoom
* based on BOOM, a modified and improved DOOM engine
* Copyright (C) 1999 by
* id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
* Copyright (C) 1999-2000 by
* Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* DESCRIPTION:
* Lookup tables.
* Do not try to look them up :-).
* In the order of appearance:
*
* int finetangent[4096] - Tangens LUT.
* Should work with BAM fairly well (12 of 16bit,
* effectively, by shifting).
*
* int finesine[10240] - Sine lookup.
* Guess what, serves as cosine, too.
* Remarkable thing is, how to use BAMs with this?
*
* int tantoangle[2049] - ArcTan LUT,
* maps tan(angle) to angle fast. Gotta search.
*
*-----------------------------------------------------------------------------
*/
#include "w_wad.h"
#include "tables.h"
#include "i_system.h"
// killough 5/3/98: reformatted
int SlopeDiv(unsigned num, unsigned den)
{
unsigned ans;
if (den < 512)
return SLOPERANGE;
ans = (num<<3)/(den>>8);
return ans <= SLOPERANGE ? ans : SLOPERANGE;
}
#ifdef TABLES_AS_LUMPS
fixed_t *finetangent;
#else
const fixed_t finetangent[4096] = { -170910304,
-56965752,-34178904,-24413316,-18988036,-15535599,-13145455,-11392683,
-10052327,-8994149,-8137527,-7429880,-6835455,-6329090,-5892567,-5512368,
-5178251,-4882318,-4618375,-4381502,-4167737,-3973855,-3797206,-3635590,
-3487165,-3350381,-3223918,-3106651,-2997613,-2895966,-2800983,-2712030,
-2628549,-2550052,-2476104,-2406322,-2340362,-2277919,-2218719,-2162516,
-2109087,-2058233,-2009771,-1963536,-1919378,-1877161,-1836758,-1798063,
-1760956,-1725348,-1691149,-1658278,-1626658,-1596220,-1566898,-1538632,
-1511367,-1485049,-1459630,-1435065,-1411312,-1388330,-1366084,-1344537,
-1323658,-1303416,-1283783,-1264730,-1246234,-1228269,-1210813,-1193846,
-1177345,-1161294,-1145673,-1130465,-1115654,-1101225,-1087164,-1073455,
-1060087,-1047046,-1034322,-1021901,-1009774,-997931,-986361,-975054,
-964003,-953199,-942633,-932298,-922186,-912289,-902602,-893117,
-883829,-874730,-865817,-857081,-848520,-840127,-831898,-823827,
-815910,-808143,-800521,-793041,-785699,-778490,-771411,-764460,
-757631,-750922,-744331,-737853,-731486,-725227,-719074,-713023,
-707072,-701219,-695462,-689797,-684223,-678737,-673338,-668024,
-662792,-657640,-652568,-647572,-642651,-637803,-633028,-628323,
-623686,-619117,-614613,-610174,-605798,-601483,-597229,-593033,
-588896,-584815,-580789,-576818,-572901,-569035,-565221,-561456,
-557741,-554074,-550455,-546881,-543354,-539870,-536431,-533034,
-529680,-526366,-523094,-519861,-516667,-513512,-510394,-507313,
-504269,-501261,-498287,-495348,-492443,-489571,-486732,-483925,
-481150,-478406,-475692,-473009,-470355,-467730,-465133,-462565,
-460024,-457511,-455024,-452564,-450129,-447720,-445337,-442978,
-440643,-438332,-436045,-433781,-431540,-429321,-427125,-424951,
-422798,-420666,-418555,-416465,-414395,-412344,-410314,-408303,
-406311,-404338,-402384,-400448,-398530,-396630,-394747,-392882,
-391034,-389202,-387387,-385589,-383807,-382040,-380290,-378555,
-376835,-375130,-373440,-371765,-370105,-368459,-366826,-365208,
-363604,-362013,-360436,-358872,-357321,-355783,-354257,-352744,
-351244,-349756,-348280,-346816,-345364,-343924,-342495,-341078,
-339671,-338276,-336892,-335519,-334157,-332805,-331464,-330133,
-328812,-327502,-326201,-324910,-323629,-322358,-321097,-319844,
-318601,-317368,-316143,-314928,-313721,-312524,-311335,-310154,
-308983,-307819,-306664,-305517,-304379,-303248,-302126,-301011,
-299904,-298805,-297714,-296630,-295554,-294485,-293423,-292369,
-291322,-290282,-289249,-288223,-287204,-286192,-285186,-284188,
-283195,-282210,-281231,-280258,-279292,-278332,-277378,-276430,
-275489,-274553,-273624,-272700,-271782,-270871,-269965,-269064,
-268169,-267280,-266397,-265519,-264646,-263779,-262917,-262060,
-261209,-260363,-259522,-258686,-257855,-257029,-256208,-255392,
-254581,-253774,-252973,-252176,-251384,-250596,-249813,-249035,
-248261,-247492,-246727,-245966,-245210,-244458,-243711,-242967,
-242228,-241493,-240763,-240036,-239314,-238595,-237881,-237170,
-236463,-235761,-235062,-234367,-233676,-232988,-232304,-231624,
-230948,-230275,-229606,-228941,-228279,-227621,-226966,-226314,
-225666,-225022,-224381,-223743,-223108,-222477,-221849,-221225,
-220603,-219985,-219370,-218758,-218149,-217544,-216941,-216341,
-215745,-215151,-214561,-213973,-213389,-212807,-212228,-211652,
-211079,-210509,-209941,-209376,-208815,-208255,-207699,-207145,
-206594,-206045,-205500,-204956,-204416,-203878,-203342,-202809,
-202279,-201751,-201226,-200703,-200182,-199664,-199149,-198636,
-198125,-197616,-197110,-196606,-196105,-195606,-195109,-194614,
-194122,-193631,-193143,-192658,-192174,-191693,-191213,-190736,
-190261,-189789,-189318,-188849,-188382,-187918,-187455,-186995,
-186536,-186080,-185625,-185173,-184722,-184274,-183827,-183382,
-182939,-182498,-182059,-181622,-181186,-180753,-180321,-179891,
-179463,-179037,-178612,-178190,-177769,-177349,-176932,-176516,
-176102,-175690,-175279,-174870,-174463,-174057,-173653,-173251,
-172850,-172451,-172053,-171657,-171263,-170870,-170479,-170089,
-169701,-169315,-168930,-168546,-168164,-167784,-167405,-167027,
-166651,-166277,-165904,-165532,-165162,-164793,-164426,-164060,
-163695,-163332,-162970,-162610,-162251,-161893,-161537,-161182,
-160828,-160476,-160125,-159775,-159427,-159079,-158734,-158389,
-158046,-157704,-157363,-157024,-156686,-156349,-156013,-155678,
-155345,-155013,-154682,-154352,-154024,-153697,-153370,-153045,
-152722,-152399,-152077,-151757,-151438,-151120,-150803,-150487,
-150172,-149859,-149546,-149235,-148924,-148615,-148307,-148000,
-147693,-147388,-147084,-146782,-146480,-146179,-145879,-145580,
-145282,-144986,-144690,-144395,-144101,-143808,-143517,-143226,
-142936,-142647,-142359,-142072,-141786,-141501,-141217,-140934,
-140651,-140370,-140090,-139810,-139532,-139254,-138977,-138701,
-138426,-138152,-137879,-137607,-137335,-137065,-136795,-136526,
-136258,-135991,-135725,-135459,-135195,-134931,-134668,-134406,
-134145,-133884,-133625,-133366,-133108,-132851,-132594,-132339,
-132084,-131830,-131576,-131324,-131072,-130821,-130571,-130322,
-130073,-129825,-129578,-129332,-129086,-128841,-128597,-128353,
-128111,-127869,-127627,-127387,-127147,-126908,-126669,-126432,
-126195,-125959,-125723,-125488,-125254,-125020,-124787,-124555,
-124324,-124093,-123863,-123633,-123404,-123176,-122949,-122722,
-122496,-122270,-122045,-121821,-121597,-121374,-121152,-120930,
-120709,-120489,-120269,-120050,-119831,-119613,-119396,-119179,
-118963,-118747,-118532,-118318,-118104,-117891,-117678,-117466,
-117254,-117044,-116833,-116623,-116414,-116206,-115998,-115790,
-115583,-115377,-115171,-114966,-114761,-114557,-114354,-114151,
-113948,-113746,-113545,-113344,-113143,-112944,-112744,-112546,
-112347,-112150,-111952,-111756,-111560,-111364,-111169,-110974,
-110780,-110586,-110393,-110200,-110008,-109817,-109626,-109435,
-109245,-109055,-108866,-108677,-108489,-108301,-108114,-107927,
-107741,-107555,-107369,-107184,-107000,-106816,-106632,-106449,
-106266,-106084,-105902,-105721,-105540,-105360,-105180,-105000,
-104821,-104643,-104465,-104287,-104109,-103933,-103756,-103580,
-103404,-103229,-103054,-102880,-102706,-102533,-102360,-102187,
-102015,-101843,-101671,-101500,-101330,-101159,-100990,-100820,
-100651,-100482,-100314,-100146,-99979,-99812,-99645,-99479,
-99313,-99148,-98982,-98818,-98653,-98489,-98326,-98163,
-98000,-97837,-97675,-97513,-97352,-97191,-97030,-96870,
-96710,-96551,-96391,-96233,-96074,-95916,-95758,-95601,
-95444,-95287,-95131,-94975,-94819,-94664,-94509,-94354,
-94200,-94046,-93892,-93739,-93586,-93434,-93281,-93129,
-92978,-92826,-92675,-92525,-92375,-92225,-92075,-91926,
-91777,-91628,-91480,-91332,-91184,-91036,-90889,-90742,
-90596,-90450,-90304,-90158,-90013,-89868,-89724,-89579,
-89435,-89292,-89148,-89005,-88862,-88720,-88577,-88435,
-88294,-88152,-88011,-87871,-87730,-87590,-87450,-87310,
-87171,-87032,-86893,-86755,-86616,-86479,-86341,-86204,
-86066,-85930,-85793,-85657,-85521,-85385,-85250,-85114,
-84980,-84845,-84710,-84576,-84443,-84309,-84176,-84043,
-83910,-83777,-83645,-83513,-83381,-83250,-83118,-82987,
-82857,-82726,-82596,-82466,-82336,-82207,-82078,-81949,
-81820,-81691,-81563,-81435,-81307,-81180,-81053,-80925,
-80799,-80672,-80546,-80420,-80294,-80168,-80043,-79918,
-79793,-79668,-79544,-79420,-79296,-79172,-79048,-78925,
-78802,-78679,-78557,-78434,-78312,-78190,-78068,-77947,
-77826,-77705,-77584,-77463,-77343,-77223,-77103,-76983,
-76864,-76744,-76625,-76506,-76388,-76269,-76151,-76033,
-75915,-75797,-75680,-75563,-75446,-75329,-75213,-75096,
-74980,-74864,-74748,-74633,-74517,-74402,-74287,-74172,
-74058,-73944,-73829,-73715,-73602,-73488,-73375,-73262,
-73149,-73036,-72923,-72811,-72699,-72587,-72475,-72363,
-72252,-72140,-72029,-71918,-71808,-71697,-71587,-71477,
-71367,-71257,-71147,-71038,-70929,-70820,-70711,-70602,
-70494,-70385,-70277,-70169,-70061,-69954,-69846,-69739,
-69632,-69525,-69418,-69312,-69205,-69099,-68993,-68887,
-68781,-68676,-68570,-68465,-68360,-68255,-68151,-68046,
-67942,-67837,-67733,-67629,-67526,-67422,-67319,-67216,
-67113,-67010,-66907,-66804,-66702,-66600,-66498,-66396,
-66294,-66192,-66091,-65989,-65888,-65787,-65686,-65586,
-65485,-65385,-65285,-65185,-65085,-64985,-64885,-64786,
-64687,-64587,-64488,-64389,-64291,-64192,-64094,-63996,
-63897,-63799,-63702,-63604,-63506,-63409,-63312,-63215,
-63118,-63021,-62924,-62828,-62731,-62635,-62539,-62443,
-62347,-62251,-62156,-62060,-61965,-61870,-61775,-61680,
-61585,-61491,-61396,-61302,-61208,-61114,-61020,-60926,
-60833,-60739,-60646,-60552,-60459,-60366,-60273,-60181,
-60088,-59996,-59903,-59811,-59719,-59627,-59535,-59444,
-59352,-59261,-59169,-59078,-58987,-58896,-58805,-58715,
-58624,-58534,-58443,-58353,-58263,-58173,-58083,-57994,
-57904,-57815,-57725,-57636,-57547,-57458,-57369,-57281,
-57192,-57104,-57015,-56927,-56839,-56751,-56663,-56575,
-56487,-56400,-56312,-56225,-56138,-56051,-55964,-55877,
-55790,-55704,-55617,-55531,-55444,-55358,-55272,-55186,
-55100,-55015,-54929,-54843,-54758,-54673,-54587,-54502,
-54417,-54333,-54248,-54163,-54079,-53994,-53910,-53826,
-53741,-53657,-53574,-53490,-53406,-53322,-53239,-53156,
-53072,-52989,-52906,-52823,-52740,-52657,-52575,-52492,
-52410,-52327,-52245,-52163,-52081,-51999,-51917,-51835,
-51754,-51672,-51591,-51509,-51428,-51347,-51266,-51185,
-51104,-51023,-50942,-50862,-50781,-50701,-50621,-50540,
-50460,-50380,-50300,-50221,-50141,-50061,-49982,-49902,
-49823,-49744,-49664,-49585,-49506,-49427,-49349,-49270,
-49191,-49113,-49034,-48956,-48878,-48799,-48721,-48643,
-48565,-48488,-48410,-48332,-48255,-48177,-48100,-48022,
-47945,-47868,-47791,-47714,-47637,-47560,-47484,-47407,
-47331,-47254,-47178,-47102,-47025,-46949,-46873,-46797,
-46721,-46646,-46570,-46494,-46419,-46343,-46268,-46193,
-46118,-46042,-45967,-45892,-45818,-45743,-45668,-45593,
-45519,-45444,-45370,-45296,-45221,-45147,-45073,-44999,
-44925,-44851,-44778,-44704,-44630,-44557,-44483,-44410,
-44337,-44263,-44190,-44117,-44044,-43971,-43898,-43826,
-43753,-43680,-43608,-43535,-43463,-43390,-43318,-43246,
-43174,-43102,-43030,-42958,-42886,-42814,-42743,-42671,
-42600,-42528,-42457,-42385,-42314,-42243,-42172,-42101,
-42030,-41959,-41888,-41817,-41747,-41676,-41605,-41535,
-41465,-41394,-41324,-41254,-41184,-41113,-41043,-40973,
-40904,-40834,-40764,-40694,-40625,-40555,-40486,-40416,
-40347,-40278,-40208,-40139,-40070,-40001,-39932,-39863,
-39794,-39726,-39657,-39588,-39520,-39451,-39383,-39314,
-39246,-39178,-39110,-39042,-38973,-38905,-38837,-38770,
-38702,-38634,-38566,-38499,-38431,-38364,-38296,-38229,
-38161,-38094,-38027,-37960,-37893,-37826,-37759,-37692,
-37625,-37558,-37491,-37425,-37358,-37291,-37225,-37158,
-37092,-37026,-36959,-36893,-36827,-36761,-36695,-36629,
-36563,-36497,-36431,-36365,-36300,-36234,-36168,-36103,
-36037,-35972,-35907,-35841,-35776,-35711,-35646,-35580,
-35515,-35450,-35385,-35321,-35256,-35191,-35126,-35062,
-34997,-34932,-34868,-34803,-34739,-34675,-34610,-34546,
-34482,-34418,-34354,-34289,-34225,-34162,-34098,-34034,
-33970,-33906,-33843,-33779,-33715,-33652,-33588,-33525,
-33461,-33398,-33335,-33272,-33208,-33145,-33082,-33019,
-32956,-32893,-32830,-32767,-32705,-32642,-32579,-32516,
-32454,-32391,-32329,-32266,-32204,-32141,-32079,-32017,
-31955,-31892,-31830,-31768,-31706,-31644,-31582,-31520,
-31458,-31396,-31335,-31273,-31211,-31150,-31088,-31026,
-30965,-30904,-30842,-30781,-30719,-30658,-30597,-30536,
-30474,-30413,-30352,-30291,-30230,-30169,-30108,-30048,
-29987,-29926,-29865,-29805,-29744,-29683,-29623,-29562,
-29502,-29441,-29381,-29321,-29260,-29200,-29140,-29080,
-29020,-28959,-28899,-28839,-28779,-28719,-28660,-28600,
-28540,-28480,-28420,-28361,-28301,-28241,-28182,-28122,
-28063,-28003,-27944,-27884,-27825,-27766,-27707,-27647,
-27588,-27529,-27470,-27411,-27352,-27293,-27234,-27175,
-27116,-27057,-26998,-26940,-26881,-26822,-26763,-26705,
-26646,-26588,-26529,-26471,-26412,-26354,-26295,-26237,
-26179,-26120,-26062,-26004,-25946,-25888,-25830,-25772,
-25714,-25656,-25598,-25540,-25482,-25424,-25366,-25308,
-25251,-25193,-25135,-25078,-25020,-24962,-24905,-24847,
-24790,-24732,-24675,-24618,-24560,-24503,-24446,-24389,
-24331,-24274,-24217,-24160,-24103,-24046,-23989,-23932,
-23875,-23818,-23761,-23704,-23647,-23591,-23534,-23477,
-23420,-23364,-23307,-23250,-23194,-23137,-23081,-23024,
-22968,-22911,-22855,-22799,-22742,-22686,-22630,-22573,
-22517,-22461,-22405,-22349,-22293,-22237,-22181,-22125,
-22069,-22013,-21957,-21901,-21845,-21789,-21733,-21678,
-21622,-21566,-21510,-21455,-21399,-21343,-21288,-21232,
-21177,-21121,-21066,-21010,-20955,-20900,-20844,-20789,
-20734,-20678,-20623,-20568,-20513,-20457,-20402,-20347,
-20292,-20237,-20182,-20127,-20072,-20017,-19962,-19907,
-19852,-19797,-19742,-19688,-19633,-19578,-19523,-19469,
-19414,-19359,-19305,-19250,-19195,-19141,-19086,-19032,
-18977,-18923,-18868,-18814,-18760,-18705,-18651,-18597,
-18542,-18488,-18434,-18380,-18325,-18271,-18217,-18163,
-18109,-18055,-18001,-17946,-17892,-17838,-17784,-17731,
-17677,-17623,-17569,-17515,-17461,-17407,-17353,-17300,
-17246,-17192,-17138,-17085,-17031,-16977,-16924,-16870,
-16817,-16763,-16710,-16656,-16603,-16549,-16496,-16442,
-16389,-16335,-16282,-16229,-16175,-16122,-16069,-16015,
-15962,-15909,-15856,-15802,-15749,-15696,-15643,-15590,
-15537,-15484,-15431,-15378,-15325,-15272,-15219,-15166,
-15113,-15060,-15007,-14954,-14901,-14848,-14795,-14743,
-14690,-14637,-14584,-14531,-14479,-14426,-14373,-14321,
-14268,-14215,-14163,-14110,-14057,-14005,-13952,-13900,
-13847,-13795,-13742,-13690,-13637,-13585,-13533,-13480,
-13428,-13375,-13323,-13271,-13218,-13166,-13114,-13062,
-13009,-12957,-12905,-12853,-12800,-12748,-12696,-12644,
-12592,-12540,-12488,-12436,-12383,-12331,-12279,-12227,
-12175,-12123,-12071,-12019,-11967,-11916,-11864,-11812,
-11760,-11708,-11656,-11604,-11552,-11501,-11449,-11397,
-11345,-11293,-11242,-11190,-11138,-11086,-11035,-10983,
-10931,-10880,-10828,-10777,-10725,-10673,-10622,-10570,
-10519,-10467,-10415,-10364,-10312,-10261,-10209,-10158,
-10106,-10055,-10004,-9952,-9901,-9849,-9798,-9747,
-9695,-9644,-9592,-9541,-9490,-9438,-9387,-9336,
-9285,-9233,-9182,-9131,-9080,-9028,-8977,-8926,
-8875,-8824,-8772,-8721,-8670,-8619,-8568,-8517,
-8466,-8414,-8363,-8312,-8261,-8210,-8159,-8108,
-8057,-8006,-7955,-7904,-7853,-7802,-7751,-7700,
-7649,-7598,-7547,-7496,-7445,-7395,-7344,-7293,
-7242,-7191,-7140,-7089,-7038,-6988,-6937,-6886,
-6835,-6784,-6733,-6683,-6632,-6581,-6530,-6480,
-6429,-6378,-6327,-6277,-6226,-6175,-6124,-6074,
-6023,-5972,-5922,-5871,-5820,-5770,-5719,-5668,
-5618,-5567,-5517,-5466,-5415,-5365,-5314,-5264,
-5213,-5162,-5112,-5061,-5011,-4960,-4910,-4859,
-4808,-4758,-4707,-4657,-4606,-4556,-4505,-4455,
-4404,-4354,-4303,-4253,-4202,-4152,-4101,-4051,
-4001,-3950,-3900,-3849,-3799,-3748,-3698,-3648,
-3597,-3547,-3496,-3446,-3395,-3345,-3295,-3244,
-3194,-3144,-3093,-3043,-2992,-2942,-2892,-2841,
-2791,-2741,-2690,-2640,-2590,-2539,-2489,-2439,
-2388,-2338,-2288,-2237,-2187,-2137,-2086,-2036,
-1986,-1935,-1885,-1835,-1784,-1734,-1684,-1633,
-1583,-1533,-1483,-1432,-1382,-1332,-1281,-1231,
-1181,-1131,-1080,-1030,-980,-929,-879,-829,
-779,-728,-678,-628,-578,-527,-477,-427,
-376,-326,-276,-226,-175,-125,-75,-25,
25,75,125,175,226,276,326,376,
427,477,527,578,628,678,728,779,
829,879,929,980,1030,1080,1131,1181,
1231,1281,1332,1382,1432,1483,1533,1583,
1633,1684,1734,1784,1835,1885,1935,1986,
2036,2086,2137,2187,2237,2288,2338,2388,
2439,2489,2539,2590,2640,2690,2741,2791,
2841,2892,2942,2992,3043,3093,3144,3194,
3244,3295,3345,3395,3446,3496,3547,3597,
3648,3698,3748,3799,3849,3900,3950,4001,
4051,4101,4152,4202,4253,4303,4354,4404,
4455,4505,4556,4606,4657,4707,4758,4808,
4859,4910,4960,5011,5061,5112,5162,5213,
5264,5314,5365,5415,5466,5517,5567,5618,
5668,5719,5770,5820,5871,5922,5972,6023,
6074,6124,6175,6226,6277,6327,6378,6429,
6480,6530,6581,6632,6683,6733,6784,6835,
6886,6937,6988,7038,7089,7140,7191,7242,
7293,7344,7395,7445,7496,7547,7598,7649,
7700,7751,7802,7853,7904,7955,8006,8057,
8108,8159,8210,8261,8312,8363,8414,8466,
8517,8568,8619,8670,8721,8772,8824,8875,
8926,8977,9028,9080,9131,9182,9233,9285,
9336,9387,9438,9490,9541,9592,9644,9695,
9747,9798,9849,9901,9952,10004,10055,10106,
10158,10209,10261,10312,10364,10415,10467,10519,
10570,10622,10673,10725,10777,10828,10880,10931,
10983,11035,11086,11138,11190,11242,11293,11345,
11397,11449,11501,11552,11604,11656,11708,11760,
11812,11864,11916,11967,12019,12071,12123,12175,
12227,12279,12331,12383,12436,12488,12540,12592,
12644,12696,12748,12800,12853,12905,12957,13009,
13062,13114,13166,13218,13271,13323,13375,13428,
13480,13533,13585,13637,13690,13742,13795,13847,
13900,13952,14005,14057,14110,14163,14215,14268,
14321,14373,14426,14479,14531,14584,14637,14690,
14743,14795,14848,14901,14954,15007,15060,15113,
15166,15219,15272,15325,15378,15431,15484,15537,
15590,15643,15696,15749,15802,15856,15909,15962,
16015,16069,16122,16175,16229,16282,16335,16389,
16442,16496,16549,16603,16656,16710,16763,16817,
16870,16924,16977,17031,17085,17138,17192,17246,
17300,17353,17407,17461,17515,17569,17623,17677,
17731,17784,17838,17892,17946,18001,18055,18109,
18163,18217,18271,18325,18380,18434,18488,18542,
18597,18651,18705,18760,18814,18868,18923,18977,
19032,19086,19141,19195,19250,19305,19359,19414,
19469,19523,19578,19633,19688,19742,19797,19852,
19907,19962,20017,20072,20127,20182,20237,20292,
20347,20402,20457,20513,20568,20623,20678,20734,
20789,20844,20900,20955,21010,21066,21121,21177,
21232,21288,21343,21399,21455,21510,21566,21622,
21678,21733,21789,21845,21901,21957,22013,22069,
22125,22181,22237,22293,22349,22405,22461,22517,
22573,22630,22686,22742,22799,22855,22911,22968,
23024,23081,23137,23194,23250,23307,23364,23420,
23477,23534,23591,23647,23704,23761,23818,23875,
23932,23989,24046,24103,24160,24217,24274,24331,
24389,24446,24503,24560,24618,24675,24732,24790,
24847,24905,24962,25020,25078,25135,25193,25251,
25308,25366,25424,25482,25540,25598,25656,25714,
25772,25830,25888,25946,26004,26062,26120,26179,
26237,26295,26354,26412,26471,26529,26588,26646,
26705,26763,26822,26881,26940,26998,27057,27116,
27175,27234,27293,27352,27411,27470,27529,27588,
27647,27707,27766,27825,27884,27944,28003,28063,
28122,28182,28241,28301,28361,28420,28480,28540,
28600,28660,28719,28779,28839,28899,28959,29020,
29080,29140,29200,29260,29321,29381,29441,29502,
29562,29623,29683,29744,29805,29865,29926,29987,
30048,30108,30169,30230,30291,30352,30413,30474,
30536,30597,30658,30719,30781,30842,30904,30965,
31026,31088,31150,31211,31273,31335,31396,31458,
31520,31582,31644,31706,31768,31830,31892,31955,
32017,32079,32141,32204,32266,32329,32391,32454,
32516,32579,32642,32705,32767,32830,32893,32956,
33019,33082,33145,33208,33272,33335,33398,33461,
33525,33588,33652,33715,33779,33843,33906,33970,
34034,34098,34162,34225,34289,34354,34418,34482,
34546,34610,34675,34739,34803,34868,34932,34997,
35062,35126,35191,35256,35321,35385,35450,35515,
35580,35646,35711,35776,35841,35907,35972,36037,
36103,36168,36234,36300,36365,36431,36497,36563,
36629,36695,36761,36827,36893,36959,37026,37092,
37158,37225,37291,37358,37425,37491,37558,37625,
37692,37759,37826,37893,37960,38027,38094,38161,
38229,38296,38364,38431,38499,38566,38634,38702,
38770,38837,38905,38973,39042,39110,39178,39246,
39314,39383,39451,39520,39588,39657,39726,39794,
39863,39932,40001,40070,40139,40208,40278,40347,
40416,40486,40555,40625,40694,40764,40834,40904,
40973,41043,41113,41184,41254,41324,41394,41465,
41535,41605,41676,41747,41817,41888,41959,42030,
42101,42172,42243,42314,42385,42457,42528,42600,
42671,42743,42814,42886,42958,43030,43102,43174,
43246,43318,43390,43463,43535,43608,43680,43753,
43826,43898,43971,44044,44117,44190,44263,44337,
44410,44483,44557,44630,44704,44778,44851,44925,
44999,45073,45147,45221,45296,45370,45444,45519,
45593,45668,45743,45818,45892,45967,46042,46118,
46193,46268,46343,46419,46494,46570,46646,46721,
46797,46873,46949,47025,47102,47178,47254,47331,
47407,47484,47560,47637,47714,47791,47868,47945,
48022,48100,48177,48255,48332,48410,48488,48565,
48643,48721,48799,48878,48956,49034,49113,49191,
49270,49349,49427,49506,49585,49664,49744,49823,
49902,49982,50061,50141,50221,50300,50380,50460,
50540,50621,50701,50781,50862,50942,51023,51104,
51185,51266,51347,51428,51509,51591,51672,51754,
51835,51917,51999,52081,52163,52245,52327,52410,
52492,52575,52657,52740,52823,52906,52989,53072,
53156,53239,53322,53406,53490,53574,53657,53741,
53826,53910,53994,54079,54163,54248,54333,54417,
54502,54587,54673,54758,54843,54929,55015,55100,
55186,55272,55358,55444,55531,55617,55704,55790,
55877,55964,56051,56138,56225,56312,56400,56487,
56575,56663,56751,56839,56927,57015,57104,57192,
57281,57369,57458,57547,57636,57725,57815,57904,
57994,58083,58173,58263,58353,58443,58534,58624,
58715,58805,58896,58987,59078,59169,59261,59352,
59444,59535,59627,59719,59811,59903,59996,60088,
60181,60273,60366,60459,60552,60646,60739,60833,
60926,61020,61114,61208,61302,61396,61491,61585,
61680,61775,61870,61965,62060,62156,62251,62347,
62443,62539,62635,62731,62828,62924,63021,63118,
63215,63312,63409,63506,63604,63702,63799,63897,
63996,64094,64192,64291,64389,64488,64587,64687,
64786,64885,64985,65085,65185,65285,65385,65485,
65586,65686,65787,65888,65989,66091,66192,66294,
66396,66498,66600,66702,66804,66907,67010,67113,
67216,67319,67422,67526,67629,67733,67837,67942,
68046,68151,68255,68360,68465,68570,68676,68781,
68887,68993,69099,69205,69312,69418,69525,69632,
69739,69846,69954,70061,70169,70277,70385,70494,
70602,70711,70820,70929,71038,71147,71257,71367,
71477,71587,71697,71808,71918,72029,72140,72252,
72363,72475,72587,72699,72811,72923,73036,73149,
73262,73375,73488,73602,73715,73829,73944,74058,
74172,74287,74402,74517,74633,74748,74864,74980,
75096,75213,75329,75446,75563,75680,75797,75915,
76033,76151,76269,76388,76506,76625,76744,76864,
76983,77103,77223,77343,77463,77584,77705,77826,
77947,78068,78190,78312,78434,78557,78679,78802,
78925,79048,79172,79296,79420,79544,79668,79793,
79918,80043,80168,80294,80420,80546,80672,80799,
80925,81053,81180,81307,81435,81563,81691,81820,
81949,82078,82207,82336,82466,82596,82726,82857,
82987,83118,83250,83381,83513,83645,83777,83910,
84043,84176,84309,84443,84576,84710,84845,84980,
85114,85250,85385,85521,85657,85793,85930,86066,
86204,86341,86479,86616,86755,86893,87032,87171,
87310,87450,87590,87730,87871,88011,88152,88294,
88435,88577,88720,88862,89005,89148,89292,89435,
89579,89724,89868,90013,90158,90304,90450,90596,
90742,90889,91036,91184,91332,91480,91628,91777,
91926,92075,92225,92375,92525,92675,92826,92978,
93129,93281,93434,93586,93739,93892,94046,94200,
94354,94509,94664,94819,94975,95131,95287,95444,
95601,95758,95916,96074,96233,96391,96551,96710,
96870,97030,97191,97352,97513,97675,97837,98000,
98163,98326,98489,98653,98818,98982,99148,99313,
99479,99645,99812,99979,100146,100314,100482,100651,
100820,100990,101159,101330,101500,101671,101843,102015,
102187,102360,102533,102706,102880,103054,103229,103404,
103580,103756,103933,104109,104287,104465,104643,104821,
105000,105180,105360,105540,105721,105902,106084,106266,
106449,106632,106816,107000,107184,107369,107555,107741,
107927,108114,108301,108489,108677,108866,109055,109245,
109435,109626,109817,110008,110200,110393,110586,110780,
110974,111169,111364,111560,111756,111952,112150,112347,
112546,112744,112944,113143,113344,113545,113746,113948,
114151,114354,114557,114761,114966,115171,115377,115583,
115790,115998,116206,116414,116623,116833,117044,117254,
117466,117678,117891,118104,118318,118532,118747,118963,
119179,119396,119613,119831,120050,120269,120489,120709,
120930,121152,121374,121597,121821,122045,122270,122496,
122722,122949,123176,123404,123633,123863,124093,124324,
124555,124787,125020,125254,125488,125723,125959,126195,
126432,126669,126908,127147,127387,127627,127869,128111,
128353,128597,128841,129086,129332,129578,129825,130073,
130322,130571,130821,131072,131324,131576,131830,132084,
132339,132594,132851,133108,133366,133625,133884,134145,
134406,134668,134931,135195,135459,135725,135991,136258,
136526,136795,137065,137335,137607,137879,138152,138426,
138701,138977,139254,139532,139810,140090,140370,140651,
140934,141217,141501,141786,142072,142359,142647,142936,
143226,143517,143808,144101,144395,144690,144986,145282,
145580,145879,146179,146480,146782,147084,147388,147693,
148000,148307,148615,148924,149235,149546,149859,150172,
150487,150803,151120,151438,151757,152077,152399,152722,
153045,153370,153697,154024,154352,154682,155013,155345,
155678,156013,156349,156686,157024,157363,157704,158046,
158389,158734,159079,159427,159775,160125,160476,160828,
161182,161537,161893,162251,162610,162970,163332,163695,
164060,164426,164793,165162,165532,165904,166277,166651,
167027,167405,167784,168164,168546,168930,169315,169701,
170089,170479,170870,171263,171657,172053,172451,172850,
173251,173653,174057,174463,174870,175279,175690,176102,
176516,176932,177349,177769,178190,178612,179037,179463,
179891,180321,180753,181186,181622,182059,182498,182939,
183382,183827,184274,184722,185173,185625,186080,186536,
186995,187455,187918,188382,188849,189318,189789,190261,
190736,191213,191693,192174,192658,193143,193631,194122,
194614,195109,195606,196105,196606,197110,197616,198125,
198636,199149,199664,200182,200703,201226,201751,202279,
202809,203342,203878,204416,204956,205500,206045,206594,
207145,207699,208255,208815,209376,209941,210509,211079,
211652,212228,212807,213389,213973,214561,215151,215745,
216341,216941,217544,218149,218758,219370,219985,220603,
221225,221849,222477,223108,223743,224381,225022,225666,
226314,226966,227621,228279,228941,229606,230275,230948,
231624,232304,232988,233676,234367,235062,235761,236463,
237170,237881,238595,239314,240036,240763,241493,242228,
242967,243711,244458,245210,245966,246727,247492,248261,
249035,249813,250596,251384,252176,252973,253774,254581,
255392,256208,257029,257855,258686,259522,260363,261209,
262060,262917,263779,264646,265519,266397,267280,268169,
269064,269965,270871,271782,272700,273624,274553,275489,
276430,277378,278332,279292,280258,281231,282210,283195,
284188,285186,286192,287204,288223,289249,290282,291322,
292369,293423,294485,295554,296630,297714,298805,299904,
301011,302126,303248,304379,305517,306664,307819,308983,
310154,311335,312524,313721,314928,316143,317368,318601,
319844,321097,322358,323629,324910,326201,327502,328812,
330133,331464,332805,334157,335519,336892,338276,339671,
341078,342495,343924,345364,346816,348280,349756,351244,
352744,354257,355783,357321,358872,360436,362013,363604,
365208,366826,368459,370105,371765,373440,375130,376835,
378555,380290,382040,383807,385589,387387,389202,391034,
392882,394747,396630,398530,400448,402384,404338,406311,
408303,410314,412344,414395,416465,418555,420666,422798,
424951,427125,429321,431540,433781,436045,438332,440643,
442978,445337,447720,450129,452564,455024,457511,460024,
462565,465133,467730,470355,473009,475692,478406,481150,
483925,486732,489571,492443,495348,498287,501261,504269,
507313,510394,513512,516667,519861,523094,526366,529680,
533034,536431,539870,543354,546881,550455,554074,557741,
561456,565221,569035,572901,576818,580789,584815,588896,
593033,597229,601483,605798,610174,614613,619117,623686,
628323,633028,637803,642651,647572,652568,657640,662792,
668024,673338,678737,684223,689797,695462,701219,707072,
713023,719074,725227,731486,737853,744331,750922,757631,
764460,771411,778490,785699,793041,800521,808143,815910,
823827,831898,840127,848520,857081,865817,874730,883829,
893117,902602,912289,922186,932298,942633,953199,964003,
975054,986361,997931,1009774,1021901,1034322,1047046,1060087,
1073455,1087164,1101225,1115654,1130465,1145673,1161294,1177345,
1193846,1210813,1228269,1246234,1264730,1283783,1303416,1323658,
1344537,1366084,1388330,1411312,1435065,1459630,1485049,1511367,
1538632,1566898,1596220,1626658,1658278,1691149,1725348,1760956,
1798063,1836758,1877161,1919378,1963536,2009771,2058233,2109087,
2162516,2218719,2277919,2340362,2406322,2476104,2550052,2628549,
2712030,2800983,2895966,2997613,3106651,3223918,3350381,3487165,
3635590,3797206,3973855,4167737,4381502,4618375,4882318,5178251,
5512368,5892567,6329090,6835455,7429880,8137527,8994149,10052327,
11392683,13145455,15535599,18988036,24413316,34178904,56965752,170910304
};
#endif
fixed_t *finecosine;
#ifdef TABLES_AS_LUMPS
fixed_t *finesine;
#else
const fixed_t finesine[10240] = {
25,75,125,175,226,276,326,376,
427,477,527,578,628,678,728,779,
829,879,929,980,1030,1080,1130,1181,
1231,1281,1331,1382,1432,1482,1532,1583,
1633,1683,1733,1784,1834,1884,1934,1985,
2035,2085,2135,2186,2236,2286,2336,2387,
2437,2487,2537,2587,2638,2688,2738,2788,
2839,2889,2939,2989,3039,3090,3140,3190,
3240,3291,3341,3391,3441,3491,3541,3592,
3642,3692,3742,3792,3843,3893,3943,3993,
4043,4093,4144,4194,4244,4294,4344,4394,
4445,4495,4545,4595,4645,4695,4745,4796,
4846,4896,4946,4996,5046,5096,5146,5197,
5247,5297,5347,5397,5447,5497,5547,5597,
5647,5697,5748,5798,5848,5898,5948,5998,
6048,6098,6148,6198,6248,6298,6348,6398,
6448,6498,6548,6598,6648,6698,6748,6798,
6848,6898,6948,6998,7048,7098,7148,7198,
7248,7298,7348,7398,7448,7498,7548,7598,
7648,7697,7747,7797,7847,7897,7947,7997,
8047,8097,8147,8196,8246,8296,8346,8396,
8446,8496,8545,8595,8645,8695,8745,8794,
8844,8894,8944,8994,9043,9093,9143,9193,
9243,9292,9342,9392,9442,9491,9541,9591,
9640,9690,9740,9790,9839,9889,9939,9988,
10038,10088,10137,10187,10237,10286,10336,10386,
10435,10485,10534,10584,10634,10683,10733,10782,
10832,10882,10931,10981,11030,11080,11129,11179,
11228,11278,11327,11377,11426,11476,11525,11575,
11624,11674,11723,11773,11822,11872,11921,11970,
12020,12069,12119,12168,12218,12267,12316,12366,
12415,12464,12514,12563,12612,12662,12711,12760,
12810,12859,12908,12957,13007,13056,13105,13154,
13204,13253,13302,13351,13401,13450,13499,13548,
13597,13647,13696,13745,13794,13843,13892,13941,
13990,14040,14089,14138,14187,14236,14285,14334,
14383,14432,14481,14530,14579,14628,14677,14726,
14775,14824,14873,14922,14971,15020,15069,15118,
15167,15215,15264,15313,15362,15411,15460,15509,
15557,15606,15655,15704,15753,15802,15850,15899,
15948,15997,16045,16094,16143,16191,16240,16289,
16338,16386,16435,16484,16532,16581,16629,16678,
16727,16775,16824,16872,16921,16970,17018,17067,
17115,17164,17212,17261,17309,17358,17406,17455,
17503,17551,17600,17648,17697,17745,17793,17842,
17890,17939,17987,18035,18084,18132,18180,18228,
18277,18325,18373,18421,18470,18518,18566,18614,
18663,18711,18759,18807,18855,18903,18951,19000,
19048,19096,19144,19192,19240,19288,19336,19384,
19432,19480,19528,19576,19624,19672,19720,19768,
19816,19864,19912,19959,20007,20055,20103,20151,
20199,20246,20294,20342,20390,20438,20485,20533,
20581,20629,20676,20724,20772,20819,20867,20915,
20962,21010,21057,21105,21153,21200,21248,21295,
21343,21390,21438,21485,21533,21580,21628,21675,
21723,21770,21817,21865,21912,21960,22007,22054,
22102,22149,22196,22243,22291,22338,22385,22433,
22480,22527,22574,22621,22668,22716,22763,22810,
22857,22904,22951,22998,23045,23092,23139,23186,
23233,23280,23327,23374,23421,23468,23515,23562,
23609,23656,23703,23750,23796,23843,23890,23937,
23984,24030,24077,24124,24171,24217,24264,24311,
24357,24404,24451,24497,24544,24591,24637,24684,
24730,24777,24823,24870,24916,24963,25009,25056,
25102,25149,25195,25241,25288,25334,25381,25427,
25473,25520,25566,25612,25658,25705,25751,25797,
25843,25889,25936,25982,26028,26074,26120,26166,
26212,26258,26304,26350,26396,26442,26488,26534,
26580,26626,26672,26718,26764,26810,26856,26902,
26947,26993,27039,27085,27131,27176,27222,27268,
27313,27359,27405,27450,27496,27542,27587,27633,
27678,27724,27770,27815,27861,27906,27952,27997,
28042,28088,28133,28179,28224,28269,28315,28360,
28405,28451,28496,28541,28586,28632,28677,28722,
28767,28812,28858,28903,28948,28993,29038,29083,
29128,29173,29218,29263,29308,29353,29398,29443,
29488,29533,29577,29622,29667,29712,29757,29801,
29846,29891,29936,29980,30025,30070,30114,30159,
30204,30248,30293,30337,30382,30426,30471,30515,
30560,30604,30649,30693,30738,30782,30826,30871,
30915,30959,31004,31048,31092,31136,31181,31225,
31269,31313,31357,31402,31446,31490,31534,31578,
31622,31666,31710,31754,31798,31842,31886,31930,
31974,32017,32061,32105,32149,32193,32236,32280,
32324,32368,32411,32455,32499,32542,32586,32630,
32673,32717,32760,32804,32847,32891,32934,32978,
33021,33065,33108,33151,33195,33238,33281,33325,
33368,33411,33454,33498,33541,33584,33627,33670,
33713,33756,33799,33843,33886,33929,33972,34015,
34057,34100,34143,34186,34229,34272,34315,34358,
34400,34443,34486,34529,34571,34614,34657,34699,
34742,34785,34827,34870,34912,34955,34997,35040,
35082,35125,35167,35210,35252,35294,35337,35379,
35421,35464,35506,35548,35590,35633,35675,35717,
35759,35801,35843,35885,35927,35969,36011,36053,
36095,36137,36179,36221,36263,36305,36347,36388,
36430,36472,36514,36555,36597,36639,36681,36722,
36764,36805,36847,36889,36930,36972,37013,37055,
37096,37137,37179,37220,37262,37303,37344,37386,
37427,37468,37509,37551,37592,37633,37674,37715,
37756,37797,37838,37879,37920,37961,38002,38043,
38084,38125,38166,38207,38248,38288,38329,38370,
38411,38451,38492,38533,38573,38614,38655,38695,
38736,38776,38817,38857,38898,38938,38979,39019,
39059,39100,39140,39180,39221,39261,39301,39341,
39382,39422,39462,39502,39542,39582,39622,39662,
39702,39742,39782,39822,39862,39902,39942,39982,
40021,40061,40101,40141,40180,40220,40260,40300,
40339,40379,40418,40458,40497,40537,40576,40616,
40655,40695,40734,40773,40813,40852,40891,40931,
40970,41009,41048,41087,41127,41166,41205,41244,
41283,41322,41361,41400,41439,41478,41517,41556,
41595,41633,41672,41711,41750,41788,41827,41866,
41904,41943,41982,42020,42059,42097,42136,42174,
42213,42251,42290,42328,42366,42405,42443,42481,
42520,42558,42596,42634,42672,42711,42749,42787,
42825,42863,42901,42939,42977,43015,43053,43091,
43128,43166,43204,43242,43280,43317,43355,43393,
43430,43468,43506,43543,43581,43618,43656,43693,
43731,43768,43806,43843,43880,43918,43955,43992,
44029,44067,44104,44141,44178,44215,44252,44289,
44326,44363,44400,44437,44474,44511,44548,44585,
44622,44659,44695,44732,44769,44806,44842,44879,
44915,44952,44989,45025,45062,45098,45135,45171,
45207,45244,45280,45316,45353,45389,45425,45462,
45498,45534,45570,45606,45642,45678,45714,45750,
45786,45822,45858,45894,45930,45966,46002,46037,
46073,46109,46145,46180,46216,46252,46287,46323,
46358,46394,46429,46465,46500,46536,46571,46606,
46642,46677,46712,46747,46783,46818,46853,46888,
46923,46958,46993,47028,47063,47098,47133,47168,
47203,47238,47273,47308,47342,47377,47412,47446,
47481,47516,47550,47585,47619,47654,47688,47723,
47757,47792,47826,47860,47895,47929,47963,47998,
48032,48066,48100,48134,48168,48202,48237,48271,
48305,48338,48372,48406,48440,48474,48508,48542,
48575,48609,48643,48676,48710,48744,48777,48811,
48844,48878,48911,48945,48978,49012,49045,49078,
49112,49145,49178,49211,49244,49278,49311,49344,
49377,49410,49443,49476,49509,49542,49575,49608,
49640,49673,49706,49739,49771,49804,49837,49869,
49902,49935,49967,50000,50032,50065,50097,50129,
50162,50194,50226,50259,50291,50323,50355,50387,
50420,50452,50484,50516,50548,50580,50612,50644,
50675,50707,50739,50771,50803,50834,50866,50898,
50929,50961,50993,51024,51056,51087,51119,51150,
51182,51213,51244,51276,51307,51338,51369,51401,
51432,51463,51494,51525,51556,51587,51618,51649,
51680,51711,51742,51773,51803,51834,51865,51896,
51926,51957,51988,52018,52049,52079,52110,52140,
52171,52201,52231,52262,52292,52322,52353,52383,
52413,52443,52473,52503,52534,52564,52594,52624,
52653,52683,52713,52743,52773,52803,52832,52862,
52892,52922,52951,52981,53010,53040,53069,53099,
53128,53158,53187,53216,53246,53275,53304,53334,
53363,53392,53421,53450,53479,53508,53537,53566,
53595,53624,53653,53682,53711,53739,53768,53797,
53826,53854,53883,53911,53940,53969,53997,54026,
54054,54082,54111,54139,54167,54196,54224,54252,
54280,54308,54337,54365,54393,54421,54449,54477,
54505,54533,54560,54588,54616,54644,54672,54699,
54727,54755,54782,54810,54837,54865,54892,54920,
54947,54974,55002,55029,55056,55084,55111,55138,
55165,55192,55219,55246,55274,55300,55327,55354,
55381,55408,55435,55462,55489,55515,55542,55569,
55595,55622,55648,55675,55701,55728,55754,55781,
55807,55833,55860,55886,55912,55938,55965,55991,
56017,56043,56069,56095,56121,56147,56173,56199,
56225,56250,56276,56302,56328,56353,56379,56404,
56430,56456,56481,56507,56532,56557,56583,56608,
56633,56659,56684,56709,56734,56760,56785,56810,
56835,56860,56885,56910,56935,56959,56984,57009,
57034,57059,57083,57108,57133,57157,57182,57206,
57231,57255,57280,57304,57329,57353,57377,57402,
57426,57450,57474,57498,57522,57546,57570,57594,
57618,57642,57666,57690,57714,57738,57762,57785,
57809,57833,57856,57880,57903,57927,57950,57974,
57997,58021,58044,58067,58091,58114,58137,58160,
58183,58207,58230,58253,58276,58299,58322,58345,
58367,58390,58413,58436,58459,58481,58504,58527,
58549,58572,58594,58617,58639,58662,58684,58706,
58729,58751,58773,58795,58818,58840,58862,58884,
58906,58928,58950,58972,58994,59016,59038,59059,
59081,59103,59125,59146,59168,59190,59211,59233,
59254,59276,59297,59318,59340,59361,59382,59404,
59425,59446,59467,59488,59509,59530,59551,59572,
59593,59614,59635,59656,59677,59697,59718,59739,
59759,59780,59801,59821,59842,59862,59883,59903,
59923,59944,59964,59984,60004,60025,60045,60065,
60085,60105,60125,60145,60165,60185,60205,60225,
60244,60264,60284,60304,60323,60343,60363,60382,
60402,60421,60441,60460,60479,60499,60518,60537,
60556,60576,60595,60614,60633,60652,60671,60690,
60709,60728,60747,60766,60785,60803,60822,60841,
60859,60878,60897,60915,60934,60952,60971,60989,
61007,61026,61044,61062,61081,61099,61117,61135,
61153,61171,61189,61207,61225,61243,61261,61279,
61297,61314,61332,61350,61367,61385,61403,61420,
61438,61455,61473,61490,61507,61525,61542,61559,
61577,61594,61611,61628,61645,61662,61679,61696,
61713,61730,61747,61764,61780,61797,61814,61831,
61847,61864,61880,61897,61913,61930,61946,61963,
61979,61995,62012,62028,62044,62060,62076,62092,
62108,62125,62141,62156,62172,62188,62204,62220,
62236,62251,62267,62283,62298,62314,62329,62345,
62360,62376,62391,62407,62422,62437,62453,62468,
62483,62498,62513,62528,62543,62558,62573,62588,
62603,62618,62633,62648,62662,62677,62692,62706,
62721,62735,62750,62764,62779,62793,62808,62822,
62836,62850,62865,62879,62893,62907,62921,62935,
62949,62963,62977,62991,63005,63019,63032,63046,
63060,63074,63087,63101,63114,63128,63141,63155,
63168,63182,63195,63208,63221,63235,63248,63261,
63274,63287,63300,63313,63326,63339,63352,63365,
63378,63390,63403,63416,63429,63441,63454,63466,
63479,63491,63504,63516,63528,63541,63553,63565,
63578,63590,63602,63614,63626,63638,63650,63662,
63674,63686,63698,63709,63721,63733,63745,63756,
63768,63779,63791,63803,63814,63825,63837,63848,
63859,63871,63882,63893,63904,63915,63927,63938,
63949,63960,63971,63981,63992,64003,64014,64025,
64035,64046,64057,64067,64078,64088,64099,64109,
64120,64130,64140,64151,64161,64171,64181,64192,
64202,64212,64222,64232,64242,64252,64261,64271,
64281,64291,64301,64310,64320,64330,64339,64349,
64358,64368,64377,64387,64396,64405,64414,64424,
64433,64442,64451,64460,64469,64478,64487,64496,
64505,64514,64523,64532,64540,64549,64558,64566,
64575,64584,64592,64601,64609,64617,64626,64634,
64642,64651,64659,64667,64675,64683,64691,64699,
64707,64715,64723,64731,64739,64747,64754,64762,
64770,64777,64785,64793,64800,64808,64815,64822,
64830,64837,64844,64852,64859,64866,64873,64880,
64887,64895,64902,64908,64915,64922,64929,64936,
64943,64949,64956,64963,64969,64976,64982,64989,
64995,65002,65008,65015,65021,65027,65033,65040,
65046,65052,65058,65064,65070,65076,65082,65088,
65094,65099,65105,65111,65117,65122,65128,65133,
65139,65144,65150,65155,65161,65166,65171,65177,
65182,65187,65192,65197,65202,65207,65212,65217,
65222,65227,65232,65237,65242,65246,65251,65256,
65260,65265,65270,65274,65279,65283,65287,65292,
65296,65300,65305,65309,65313,65317,65321,65325,
65329,65333,65337,65341,65345,65349,65352,65356,
65360,65363,65367,65371,65374,65378,65381,65385,
65388,65391,65395,65398,65401,65404,65408,65411,
65414,65417,65420,65423,65426,65429,65431,65434,
65437,65440,65442,65445,65448,65450,65453,65455,
65458,65460,65463,65465,65467,65470,65472,65474,
65476,65478,65480,65482,65484,65486,65488,65490,
65492,65494,65496,65497,65499,65501,65502,65504,
65505,65507,65508,65510,65511,65513,65514,65515,
65516,65518,65519,65520,65521,65522,65523,65524,
65525,65526,65527,65527,65528,65529,65530,65530,
65531,65531,65532,65532,65533,65533,65534,65534,
65534,65535,65535,65535,65535,65535,65535,65535,
65535,65535,65535,65535,65535,65535,65535,65534,
65534,65534,65533,65533,65532,65532,65531,65531,
65530,65530,65529,65528,65527,65527,65526,65525,
65524,65523,65522,65521,65520,65519,65518,65516,
65515,65514,65513,65511,65510,65508,65507,65505,
65504,65502,65501,65499,65497,65496,65494,65492,
65490,65488,65486,65484,65482,65480,65478,65476,
65474,65472,65470,65467,65465,65463,65460,65458,
65455,65453,65450,65448,65445,65442,65440,65437,
65434,65431,65429,65426,65423,65420,65417,65414,
65411,65408,65404,65401,65398,65395,65391,65388,
65385,65381,65378,65374,65371,65367,65363,65360,
65356,65352,65349,65345,65341,65337,65333,65329,
65325,65321,65317,65313,65309,65305,65300,65296,
65292,65287,65283,65279,65274,65270,65265,65260,
65256,65251,65246,65242,65237,65232,65227,65222,
65217,65212,65207,65202,65197,65192,65187,65182,
65177,65171,65166,65161,65155,65150,65144,65139,
65133,65128,65122,65117,65111,65105,65099,65094,
65088,65082,65076,65070,65064,65058,65052,65046,
65040,65033,65027,65021,65015,65008,65002,64995,
64989,64982,64976,64969,64963,64956,64949,64943,
64936,64929,64922,64915,64908,64902,64895,64887,
64880,64873,64866,64859,64852,64844,64837,64830,
64822,64815,64808,64800,64793,64785,64777,64770,
64762,64754,64747,64739,64731,64723,64715,64707,
64699,64691,64683,64675,64667,64659,64651,64642,
64634,64626,64617,64609,64600,64592,64584,64575,
64566,64558,64549,64540,64532,64523,64514,64505,
64496,64487,64478,64469,64460,64451,64442,64433,
64424,64414,64405,64396,64387,64377,64368,64358,
64349,64339,64330,64320,64310,64301,64291,64281,
64271,64261,64252,64242,64232,64222,64212,64202,
64192,64181,64171,64161,64151,64140,64130,64120,
64109,64099,64088,64078,64067,64057,64046,64035,
64025,64014,64003,63992,63981,63971,63960,63949,
63938,63927,63915,63904,63893,63882,63871,63859,
63848,63837,63825,63814,63803,63791,63779,63768,
63756,63745,63733,63721,63709,63698,63686,63674,
63662,63650,63638,63626,63614,63602,63590,63578,
63565,63553,63541,63528,63516,63504,63491,63479,
63466,63454,63441,63429,63416,63403,63390,63378,
63365,63352,63339,63326,63313,63300,63287,63274,
63261,63248,63235,63221,63208,63195,63182,63168,
63155,63141,63128,63114,63101,63087,63074,63060,
63046,63032,63019,63005,62991,62977,62963,62949,
62935,62921,62907,62893,62879,62865,62850,62836,
62822,62808,62793,62779,62764,62750,62735,62721,
62706,62692,62677,62662,62648,62633,62618,62603,
62588,62573,62558,62543,62528,62513,62498,62483,
62468,62453,62437,62422,62407,62391,62376,62360,
62345,62329,62314,62298,62283,62267,62251,62236,
62220,62204,62188,62172,62156,62141,62125,62108,
62092,62076,62060,62044,62028,62012,61995,61979,
61963,61946,61930,61913,61897,61880,61864,61847,
61831,61814,61797,61780,61764,61747,61730,61713,
61696,61679,61662,61645,61628,61611,61594,61577,
61559,61542,61525,61507,61490,61473,61455,61438,
61420,61403,61385,61367,61350,61332,61314,61297,
61279,61261,61243,61225,61207,61189,61171,61153,
61135,61117,61099,61081,61062,61044,61026,61007,
60989,60971,60952,60934,60915,60897,60878,60859,
60841,60822,60803,60785,60766,60747,60728,60709,
60690,60671,60652,60633,60614,60595,60576,60556,
60537,60518,60499,60479,60460,60441,60421,60402,
60382,60363,60343,60323,60304,60284,60264,60244,
60225,60205,60185,60165,60145,60125,60105,60085,
60065,60045,60025,60004,59984,59964,59944,59923,
59903,59883,59862,59842,59821,59801,59780,59759,
59739,59718,59697,59677,59656,59635,59614,59593,
59572,59551,59530,59509,59488,59467,59446,59425,
59404,59382,59361,59340,59318,59297,59276,59254,
59233,59211,59190,59168,59146,59125,59103,59081,
59059,59038,59016,58994,58972,58950,58928,58906,
58884,58862,58840,58818,58795,58773,58751,58729,
58706,58684,58662,58639,58617,58594,58572,58549,
58527,58504,58481,58459,58436,58413,58390,58367,
58345,58322,58299,58276,58253,58230,58207,58183,
58160,58137,58114,58091,58067,58044,58021,57997,
57974,57950,57927,57903,57880,57856,57833,57809,
57785,57762,57738,57714,57690,57666,57642,57618,
57594,57570,57546,57522,57498,57474,57450,57426,
57402,57377,57353,57329,57304,57280,57255,57231,
57206,57182,57157,57133,57108,57083,57059,57034,
57009,56984,56959,56935,56910,56885,56860,56835,
56810,56785,56760,56734,56709,56684,56659,56633,
56608,56583,56557,56532,56507,56481,56456,56430,
56404,56379,56353,56328,56302,56276,56250,56225,
56199,56173,56147,56121,56095,56069,56043,56017,
55991,55965,55938,55912,55886,55860,55833,55807,
55781,55754,55728,55701,55675,55648,55622,55595,
55569,55542,55515,55489,55462,55435,55408,55381,
55354,55327,55300,55274,55246,55219,55192,55165,
55138,55111,55084,55056,55029,55002,54974,54947,
54920,54892,54865,54837,54810,54782,54755,54727,
54699,54672,54644,54616,54588,54560,54533,54505,
54477,54449,54421,54393,54365,54337,54308,54280,
54252,54224,54196,54167,54139,54111,54082,54054,
54026,53997,53969,53940,53911,53883,53854,53826,
53797,53768,53739,53711,53682,53653,53624,53595,
53566,53537,53508,53479,53450,53421,53392,53363,
53334,53304,53275,53246,53216,53187,53158,53128,
53099,53069,53040,53010,52981,52951,52922,52892,
52862,52832,52803,52773,52743,52713,52683,52653,
52624,52594,52564,52534,52503,52473,52443,52413,
52383,52353,52322,52292,52262,52231,52201,52171,
52140,52110,52079,52049,52018,51988,51957,51926,
51896,51865,51834,51803,51773,51742,51711,51680,
51649,51618,51587,51556,51525,51494,51463,51432,
51401,51369,51338,51307,51276,51244,51213,51182,
51150,51119,51087,51056,51024,50993,50961,50929,
50898,50866,50834,50803,50771,50739,50707,50675,
50644,50612,50580,50548,50516,50484,50452,50420,
50387,50355,50323,50291,50259,50226,50194,50162,
50129,50097,50065,50032,50000,49967,49935,49902,
49869,49837,49804,49771,49739,49706,49673,49640,
49608,49575,49542,49509,49476,49443,49410,49377,
49344,49311,49278,49244,49211,49178,49145,49112,
49078,49045,49012,48978,48945,48911,48878,48844,
48811,48777,48744,48710,48676,48643,48609,48575,
48542,48508,48474,48440,48406,48372,48338,48304,
48271,48237,48202,48168,48134,48100,48066,48032,
47998,47963,47929,47895,47860,47826,47792,47757,
47723,47688,47654,47619,47585,47550,47516,47481,
47446,47412,47377,47342,47308,47273,47238,47203,
47168,47133,47098,47063,47028,46993,46958,46923,
46888,46853,46818,46783,46747,46712,46677,46642,
46606,46571,46536,46500,46465,46429,46394,46358,
46323,46287,46252,46216,46180,46145,46109,46073,
46037,46002,45966,45930,45894,45858,45822,45786,
45750,45714,45678,45642,45606,45570,45534,45498,
45462,45425,45389,45353,45316,45280,45244,45207,
45171,45135,45098,45062,45025,44989,44952,44915,
44879,44842,44806,44769,44732,44695,44659,44622,
44585,44548,44511,44474,44437,44400,44363,44326,
44289,44252,44215,44178,44141,44104,44067,44029,
43992,43955,43918,43880,43843,43806,43768,43731,
43693,43656,43618,43581,43543,43506,43468,43430,
43393,43355,43317,43280,43242,43204,43166,43128,
43091,43053,43015,42977,42939,42901,42863,42825,
42787,42749,42711,42672,42634,42596,42558,42520,
42481,42443,42405,42366,42328,42290,42251,42213,
42174,42136,42097,42059,42020,41982,41943,41904,
41866,41827,41788,41750,41711,41672,41633,41595,
41556,41517,41478,41439,41400,41361,41322,41283,
41244,41205,41166,41127,41088,41048,41009,40970,
40931,40891,40852,40813,40773,40734,40695,40655,
40616,40576,40537,40497,40458,40418,40379,40339,
40300,40260,40220,40180,40141,40101,40061,40021,
39982,39942,39902,39862,39822,39782,39742,39702,
39662,39622,39582,39542,39502,39462,39422,39382,
39341,39301,39261,39221,39180,39140,39100,39059,
39019,38979,38938,38898,38857,38817,38776,38736,
38695,38655,38614,38573,38533,38492,38451,38411,
38370,38329,38288,38248,38207,38166,38125,38084,
38043,38002,37961,37920,37879,37838,37797,37756,
37715,37674,37633,37592,37551,37509,37468,37427,
37386,37344,37303,37262,37220,37179,37137,37096,
37055,37013,36972,36930,36889,36847,36805,36764,
36722,36681,36639,36597,36556,36514,36472,36430,
36388,36347,36305,36263,36221,36179,36137,36095,
36053,36011,35969,35927,35885,35843,35801,35759,
35717,35675,35633,35590,35548,35506,35464,35421,
35379,35337,35294,35252,35210,35167,35125,35082,
35040,34997,34955,34912,34870,34827,34785,34742,
34699,34657,34614,34571,34529,34486,34443,34400,
34358,34315,34272,34229,34186,34143,34100,34057,
34015,33972,33929,33886,33843,33799,33756,33713,
33670,33627,33584,33541,33498,33454,33411,33368,
33325,33281,33238,33195,33151,33108,33065,33021,
32978,32934,32891,32847,32804,32760,32717,32673,
32630,32586,32542,32499,32455,32411,32368,32324,
32280,32236,32193,32149,32105,32061,32017,31974,
31930,31886,31842,31798,31754,31710,31666,31622,
31578,31534,31490,31446,31402,31357,31313,31269,
31225,31181,31136,31092,31048,31004,30959,30915,
30871,30826,30782,30738,30693,30649,30604,30560,
30515,30471,30426,30382,30337,30293,30248,30204,
30159,30114,30070,30025,29980,29936,29891,29846,
29801,29757,29712,29667,29622,29577,29533,29488,
29443,29398,29353,29308,29263,29218,29173,29128,
29083,29038,28993,28948,28903,28858,28812,28767,
28722,28677,28632,28586,28541,28496,28451,28405,
28360,28315,28269,28224,28179,28133,28088,28042,
27997,27952,27906,27861,27815,27770,27724,27678,
27633,27587,27542,27496,27450,27405,27359,27313,
27268,27222,27176,27131,27085,27039,26993,26947,
26902,26856,26810,26764,26718,26672,26626,26580,
26534,26488,26442,26396,26350,26304,26258,26212,
26166,26120,26074,26028,25982,25936,25889,25843,
25797,25751,25705,25658,25612,25566,25520,25473,
25427,25381,25334,25288,25241,25195,25149,25102,
25056,25009,24963,24916,24870,24823,24777,24730,
24684,24637,24591,24544,24497,24451,24404,24357,
24311,24264,24217,24171,24124,24077,24030,23984,
23937,23890,23843,23796,23750,23703,23656,23609,
23562,23515,23468,23421,23374,23327,23280,23233,
23186,23139,23092,23045,22998,22951,22904,22857,
22810,22763,22716,22668,22621,22574,22527,22480,
22433,22385,22338,22291,22243,22196,22149,22102,
22054,22007,21960,21912,21865,21817,21770,21723,
21675,21628,21580,21533,21485,21438,21390,21343,
21295,21248,21200,21153,21105,21057,21010,20962,
20915,20867,20819,20772,20724,20676,20629,20581,
20533,20485,20438,20390,20342,20294,20246,20199,
20151,20103,20055,20007,19959,19912,19864,19816,
19768,19720,19672,19624,19576,19528,19480,19432,
19384,19336,19288,19240,19192,19144,19096,19048,
19000,18951,18903,18855,18807,18759,18711,18663,
18614,18566,18518,18470,18421,18373,18325,18277,
18228,18180,18132,18084,18035,17987,17939,17890,
17842,17793,17745,17697,17648,17600,17551,17503,
17455,17406,17358,17309,17261,17212,17164,17115,
17067,17018,16970,16921,16872,16824,16775,16727,
16678,16629,16581,16532,16484,16435,16386,16338,
16289,16240,16191,16143,16094,16045,15997,15948,
15899,15850,15802,15753,15704,15655,15606,15557,
15509,15460,15411,15362,15313,15264,15215,15167,
15118,15069,15020,14971,14922,14873,14824,14775,
14726,14677,14628,14579,14530,14481,14432,14383,
14334,14285,14236,14187,14138,14089,14040,13990,
13941,13892,13843,13794,13745,13696,13646,13597,
13548,13499,13450,13401,13351,13302,13253,13204,
13154,13105,13056,13007,12957,12908,12859,12810,
12760,12711,12662,12612,12563,12514,12464,12415,
12366,12316,12267,12218,12168,12119,12069,12020,
11970,11921,11872,11822,11773,11723,11674,11624,
11575,11525,11476,11426,11377,11327,11278,11228,
11179,11129,11080,11030,10981,10931,10882,10832,
10782,10733,10683,10634,10584,10534,10485,10435,
10386,10336,10286,10237,10187,10137,10088,10038,
9988,9939,9889,9839,9790,9740,9690,9640,
9591,9541,9491,9442,9392,9342,9292,9243,
9193,9143,9093,9043,8994,8944,8894,8844,
8794,8745,8695,8645,8595,8545,8496,8446,
8396,8346,8296,8246,8196,8147,8097,8047,
7997,7947,7897,7847,7797,7747,7697,7648,
7598,7548,7498,7448,7398,7348,7298,7248,
7198,7148,7098,7048,6998,6948,6898,6848,
6798,6748,6698,6648,6598,6548,6498,6448,
6398,6348,6298,6248,6198,6148,6098,6048,
5998,5948,5898,5848,5798,5748,5697,5647,
5597,5547,5497,5447,5397,5347,5297,5247,
5197,5146,5096,5046,4996,4946,4896,4846,
4796,4745,4695,4645,4595,4545,4495,4445,
4394,4344,4294,4244,4194,4144,4093,4043,
3993,3943,3893,3843,3792,3742,3692,3642,
3592,3541,3491,3441,3391,3341,3291,3240,
3190,3140,3090,3039,2989,2939,2889,2839,
2788,2738,2688,2638,2587,2537,2487,2437,
2387,2336,2286,2236,2186,2135,2085,2035,
1985,1934,1884,1834,1784,1733,1683,1633,
1583,1532,1482,1432,1382,1331,1281,1231,
1181,1130,1080,1030,980,929,879,829,
779,728,678,628,578,527,477,427,
376,326,276,226,175,125,75,25,
-25,-75,-125,-175,-226,-276,-326,-376,
-427,-477,-527,-578,-628,-678,-728,-779,
-829,-879,-929,-980,-1030,-1080,-1130,-1181,
-1231,-1281,-1331,-1382,-1432,-1482,-1532,-1583,
-1633,-1683,-1733,-1784,-1834,-1884,-1934,-1985,
-2035,-2085,-2135,-2186,-2236,-2286,-2336,-2387,
-2437,-2487,-2537,-2588,-2638,-2688,-2738,-2788,
-2839,-2889,-2939,-2989,-3039,-3090,-3140,-3190,
-3240,-3291,-3341,-3391,-3441,-3491,-3541,-3592,
-3642,-3692,-3742,-3792,-3843,-3893,-3943,-3993,
-4043,-4093,-4144,-4194,-4244,-4294,-4344,-4394,
-4445,-4495,-4545,-4595,-4645,-4695,-4745,-4796,
-4846,-4896,-4946,-4996,-5046,-5096,-5146,-5197,
-5247,-5297,-5347,-5397,-5447,-5497,-5547,-5597,
-5647,-5697,-5748,-5798,-5848,-5898,-5948,-5998,
-6048,-6098,-6148,-6198,-6248,-6298,-6348,-6398,
-6448,-6498,-6548,-6598,-6648,-6698,-6748,-6798,
-6848,-6898,-6948,-6998,-7048,-7098,-7148,-7198,
-7248,-7298,-7348,-7398,-7448,-7498,-7548,-7598,
-7648,-7697,-7747,-7797,-7847,-7897,-7947,-7997,
-8047,-8097,-8147,-8196,-8246,-8296,-8346,-8396,
-8446,-8496,-8545,-8595,-8645,-8695,-8745,-8794,
-8844,-8894,-8944,-8994,-9043,-9093,-9143,-9193,
-9243,-9292,-9342,-9392,-9442,-9491,-9541,-9591,
-9640,-9690,-9740,-9790,-9839,-9889,-9939,-9988,
-10038,-10088,-10137,-10187,-10237,-10286,-10336,-10386,
-10435,-10485,-10534,-10584,-10634,-10683,-10733,-10782,
-10832,-10882,-10931,-10981,-11030,-11080,-11129,-11179,
-11228,-11278,-11327,-11377,-11426,-11476,-11525,-11575,
-11624,-11674,-11723,-11773,-11822,-11872,-11921,-11970,
-12020,-12069,-12119,-12168,-12218,-12267,-12316,-12366,
-12415,-12464,-12514,-12563,-12612,-12662,-12711,-12760,
-12810,-12859,-12908,-12957,-13007,-13056,-13105,-13154,
-13204,-13253,-13302,-13351,-13401,-13450,-13499,-13548,
-13597,-13647,-13696,-13745,-13794,-13843,-13892,-13941,
-13990,-14040,-14089,-14138,-14187,-14236,-14285,-14334,
-14383,-14432,-14481,-14530,-14579,-14628,-14677,-14726,
-14775,-14824,-14873,-14922,-14971,-15020,-15069,-15118,
-15167,-15215,-15264,-15313,-15362,-15411,-15460,-15509,
-15557,-15606,-15655,-15704,-15753,-15802,-15850,-15899,
-15948,-15997,-16045,-16094,-16143,-16191,-16240,-16289,
-16338,-16386,-16435,-16484,-16532,-16581,-16629,-16678,
-16727,-16775,-16824,-16872,-16921,-16970,-17018,-17067,
-17115,-17164,-17212,-17261,-17309,-17358,-17406,-17455,
-17503,-17551,-17600,-17648,-17697,-17745,-17793,-17842,
-17890,-17939,-17987,-18035,-18084,-18132,-18180,-18228,
-18277,-18325,-18373,-18421,-18470,-18518,-18566,-18614,
-18663,-18711,-18759,-18807,-18855,-18903,-18951,-19000,
-19048,-19096,-19144,-19192,-19240,-19288,-19336,-19384,
-19432,-19480,-19528,-19576,-19624,-19672,-19720,-19768,
-19816,-19864,-19912,-19959,-20007,-20055,-20103,-20151,
-20199,-20246,-20294,-20342,-20390,-20438,-20485,-20533,
-20581,-20629,-20676,-20724,-20772,-20819,-20867,-20915,
-20962,-21010,-21057,-21105,-21153,-21200,-21248,-21295,
-21343,-21390,-21438,-21485,-21533,-21580,-21628,-21675,
-21723,-21770,-21817,-21865,-21912,-21960,-22007,-22054,
-22102,-22149,-22196,-22243,-22291,-22338,-22385,-22433,
-22480,-22527,-22574,-22621,-22668,-22716,-22763,-22810,
-22857,-22904,-22951,-22998,-23045,-23092,-23139,-23186,
-23233,-23280,-23327,-23374,-23421,-23468,-23515,-23562,
-23609,-23656,-23703,-23750,-23796,-23843,-23890,-23937,
-23984,-24030,-24077,-24124,-24171,-24217,-24264,-24311,
-24357,-24404,-24451,-24497,-24544,-24591,-24637,-24684,
-24730,-24777,-24823,-24870,-24916,-24963,-25009,-25056,
-25102,-25149,-25195,-25241,-25288,-25334,-25381,-25427,
-25473,-25520,-25566,-25612,-25658,-25705,-25751,-25797,
-25843,-25889,-25936,-25982,-26028,-26074,-26120,-26166,
-26212,-26258,-26304,-26350,-26396,-26442,-26488,-26534,
-26580,-26626,-26672,-26718,-26764,-26810,-26856,-26902,
-26947,-26993,-27039,-27085,-27131,-27176,-27222,-27268,
-27313,-27359,-27405,-27450,-27496,-27542,-27587,-27633,
-27678,-27724,-27770,-27815,-27861,-27906,-27952,-27997,
-28042,-28088,-28133,-28179,-28224,-28269,-28315,-28360,
-28405,-28451,-28496,-28541,-28586,-28632,-28677,-28722,
-28767,-28812,-28858,-28903,-28948,-28993,-29038,-29083,
-29128,-29173,-29218,-29263,-29308,-29353,-29398,-29443,
-29488,-29533,-29577,-29622,-29667,-29712,-29757,-29801,
-29846,-29891,-29936,-29980,-30025,-30070,-30114,-30159,
-30204,-30248,-30293,-30337,-30382,-30426,-30471,-30515,
-30560,-30604,-30649,-30693,-30738,-30782,-30826,-30871,
-30915,-30959,-31004,-31048,-31092,-31136,-31181,-31225,
-31269,-31313,-31357,-31402,-31446,-31490,-31534,-31578,
-31622,-31666,-31710,-31754,-31798,-31842,-31886,-31930,
-31974,-32017,-32061,-32105,-32149,-32193,-32236,-32280,
-32324,-32368,-32411,-32455,-32499,-32542,-32586,-32630,
-32673,-32717,-32760,-32804,-32847,-32891,-32934,-32978,
-33021,-33065,-33108,-33151,-33195,-33238,-33281,-33325,
-33368,-33411,-33454,-33498,-33541,-33584,-33627,-33670,
-33713,-33756,-33799,-33843,-33886,-33929,-33972,-34015,
-34057,-34100,-34143,-34186,-34229,-34272,-34315,-34358,
-34400,-34443,-34486,-34529,-34571,-34614,-34657,-34699,
-34742,-34785,-34827,-34870,-34912,-34955,-34997,-35040,
-35082,-35125,-35167,-35210,-35252,-35294,-35337,-35379,
-35421,-35464,-35506,-35548,-35590,-35633,-35675,-35717,
-35759,-35801,-35843,-35885,-35927,-35969,-36011,-36053,
-36095,-36137,-36179,-36221,-36263,-36305,-36347,-36388,
-36430,-36472,-36514,-36555,-36597,-36639,-36681,-36722,
-36764,-36805,-36847,-36889,-36930,-36972,-37013,-37055,
-37096,-37137,-37179,-37220,-37262,-37303,-37344,-37386,
-37427,-37468,-37509,-37551,-37592,-37633,-37674,-37715,
-37756,-37797,-37838,-37879,-37920,-37961,-38002,-38043,
-38084,-38125,-38166,-38207,-38248,-38288,-38329,-38370,
-38411,-38451,-38492,-38533,-38573,-38614,-38655,-38695,
-38736,-38776,-38817,-38857,-38898,-38938,-38979,-39019,
-39059,-39100,-39140,-39180,-39221,-39261,-39301,-39341,
-39382,-39422,-39462,-39502,-39542,-39582,-39622,-39662,
-39702,-39742,-39782,-39822,-39862,-39902,-39942,-39982,
-40021,-40061,-40101,-40141,-40180,-40220,-40260,-40299,
-40339,-40379,-40418,-40458,-40497,-40537,-40576,-40616,
-40655,-40695,-40734,-40773,-40813,-40852,-40891,-40931,
-40970,-41009,-41048,-41087,-41127,-41166,-41205,-41244,
-41283,-41322,-41361,-41400,-41439,-41478,-41517,-41556,
-41595,-41633,-41672,-41711,-41750,-41788,-41827,-41866,
-41904,-41943,-41982,-42020,-42059,-42097,-42136,-42174,
-42213,-42251,-42290,-42328,-42366,-42405,-42443,-42481,
-42520,-42558,-42596,-42634,-42672,-42711,-42749,-42787,
-42825,-42863,-42901,-42939,-42977,-43015,-43053,-43091,
-43128,-43166,-43204,-43242,-43280,-43317,-43355,-43393,
-43430,-43468,-43506,-43543,-43581,-43618,-43656,-43693,
-43731,-43768,-43806,-43843,-43880,-43918,-43955,-43992,
-44029,-44067,-44104,-44141,-44178,-44215,-44252,-44289,
-44326,-44363,-44400,-44437,-44474,-44511,-44548,-44585,
-44622,-44659,-44695,-44732,-44769,-44806,-44842,-44879,
-44915,-44952,-44989,-45025,-45062,-45098,-45135,-45171,
-45207,-45244,-45280,-45316,-45353,-45389,-45425,-45462,
-45498,-45534,-45570,-45606,-45642,-45678,-45714,-45750,
-45786,-45822,-45858,-45894,-45930,-45966,-46002,-46037,
-46073,-46109,-46145,-46180,-46216,-46252,-46287,-46323,
-46358,-46394,-46429,-46465,-46500,-46536,-46571,-46606,
-46642,-46677,-46712,-46747,-46783,-46818,-46853,-46888,
-46923,-46958,-46993,-47028,-47063,-47098,-47133,-47168,
-47203,-47238,-47273,-47308,-47342,-47377,-47412,-47446,
-47481,-47516,-47550,-47585,-47619,-47654,-47688,-47723,
-47757,-47792,-47826,-47860,-47895,-47929,-47963,-47998,
-48032,-48066,-48100,-48134,-48168,-48202,-48236,-48271,
-48304,-48338,-48372,-48406,-48440,-48474,-48508,-48542,
-48575,-48609,-48643,-48676,-48710,-48744,-48777,-48811,
-48844,-48878,-48911,-48945,-48978,-49012,-49045,-49078,
-49112,-49145,-49178,-49211,-49244,-49278,-49311,-49344,
-49377,-49410,-49443,-49476,-49509,-49542,-49575,-49608,
-49640,-49673,-49706,-49739,-49771,-49804,-49837,-49869,
-49902,-49935,-49967,-50000,-50032,-50065,-50097,-50129,
-50162,-50194,-50226,-50259,-50291,-50323,-50355,-50387,
-50420,-50452,-50484,-50516,-50548,-50580,-50612,-50644,
-50675,-50707,-50739,-50771,-50803,-50834,-50866,-50898,
-50929,-50961,-50993,-51024,-51056,-51087,-51119,-51150,
-51182,-51213,-51244,-51276,-51307,-51338,-51369,-51401,
-51432,-51463,-51494,-51525,-51556,-51587,-51618,-51649,
-51680,-51711,-51742,-51773,-51803,-51834,-51865,-51896,
-51926,-51957,-51988,-52018,-52049,-52079,-52110,-52140,
-52171,-52201,-52231,-52262,-52292,-52322,-52353,-52383,
-52413,-52443,-52473,-52503,-52534,-52564,-52594,-52624,
-52653,-52683,-52713,-52743,-52773,-52803,-52832,-52862,
-52892,-52922,-52951,-52981,-53010,-53040,-53069,-53099,
-53128,-53158,-53187,-53216,-53246,-53275,-53304,-53334,
-53363,-53392,-53421,-53450,-53479,-53508,-53537,-53566,
-53595,-53624,-53653,-53682,-53711,-53739,-53768,-53797,
-53826,-53854,-53883,-53911,-53940,-53969,-53997,-54026,
-54054,-54082,-54111,-54139,-54167,-54196,-54224,-54252,
-54280,-54308,-54337,-54365,-54393,-54421,-54449,-54477,
-54505,-54533,-54560,-54588,-54616,-54644,-54672,-54699,
-54727,-54755,-54782,-54810,-54837,-54865,-54892,-54920,
-54947,-54974,-55002,-55029,-55056,-55084,-55111,-55138,
-55165,-55192,-55219,-55246,-55274,-55300,-55327,-55354,
-55381,-55408,-55435,-55462,-55489,-55515,-55542,-55569,
-55595,-55622,-55648,-55675,-55701,-55728,-55754,-55781,
-55807,-55833,-55860,-55886,-55912,-55938,-55965,-55991,
-56017,-56043,-56069,-56095,-56121,-56147,-56173,-56199,
-56225,-56250,-56276,-56302,-56328,-56353,-56379,-56404,
-56430,-56456,-56481,-56507,-56532,-56557,-56583,-56608,
-56633,-56659,-56684,-56709,-56734,-56760,-56785,-56810,
-56835,-56860,-56885,-56910,-56935,-56959,-56984,-57009,
-57034,-57059,-57083,-57108,-57133,-57157,-57182,-57206,
-57231,-57255,-57280,-57304,-57329,-57353,-57377,-57402,
-57426,-57450,-57474,-57498,-57522,-57546,-57570,-57594,
-57618,-57642,-57666,-57690,-57714,-57738,-57762,-57785,
-57809,-57833,-57856,-57880,-57903,-57927,-57950,-57974,
-57997,-58021,-58044,-58067,-58091,-58114,-58137,-58160,
-58183,-58207,-58230,-58253,-58276,-58299,-58322,-58345,
-58367,-58390,-58413,-58436,-58459,-58481,-58504,-58527,
-58549,-58572,-58594,-58617,-58639,-58662,-58684,-58706,
-58729,-58751,-58773,-58795,-58818,-58840,-58862,-58884,
-58906,-58928,-58950,-58972,-58994,-59016,-59038,-59059,
-59081,-59103,-59125,-59146,-59168,-59190,-59211,-59233,
-59254,-59276,-59297,-59318,-59340,-59361,-59382,-59404,
-59425,-59446,-59467,-59488,-59509,-59530,-59551,-59572,
-59593,-59614,-59635,-59656,-59677,-59697,-59718,-59739,
-59759,-59780,-59801,-59821,-59842,-59862,-59883,-59903,
-59923,-59944,-59964,-59984,-60004,-60025,-60045,-60065,
-60085,-60105,-60125,-60145,-60165,-60185,-60205,-60225,
-60244,-60264,-60284,-60304,-60323,-60343,-60363,-60382,
-60402,-60421,-60441,-60460,-60479,-60499,-60518,-60537,
-60556,-60576,-60595,-60614,-60633,-60652,-60671,-60690,
-60709,-60728,-60747,-60766,-60785,-60803,-60822,-60841,
-60859,-60878,-60897,-60915,-60934,-60952,-60971,-60989,
-61007,-61026,-61044,-61062,-61081,-61099,-61117,-61135,
-61153,-61171,-61189,-61207,-61225,-61243,-61261,-61279,
-61297,-61314,-61332,-61350,-61367,-61385,-61403,-61420,
-61438,-61455,-61473,-61490,-61507,-61525,-61542,-61559,
-61577,-61594,-61611,-61628,-61645,-61662,-61679,-61696,
-61713,-61730,-61747,-61764,-61780,-61797,-61814,-61831,
-61847,-61864,-61880,-61897,-61913,-61930,-61946,-61963,
-61979,-61995,-62012,-62028,-62044,-62060,-62076,-62092,
-62108,-62125,-62141,-62156,-62172,-62188,-62204,-62220,
-62236,-62251,-62267,-62283,-62298,-62314,-62329,-62345,
-62360,-62376,-62391,-62407,-62422,-62437,-62453,-62468,
-62483,-62498,-62513,-62528,-62543,-62558,-62573,-62588,
-62603,-62618,-62633,-62648,-62662,-62677,-62692,-62706,
-62721,-62735,-62750,-62764,-62779,-62793,-62808,-62822,
-62836,-62850,-62865,-62879,-62893,-62907,-62921,-62935,
-62949,-62963,-62977,-62991,-63005,-63019,-63032,-63046,
-63060,-63074,-63087,-63101,-63114,-63128,-63141,-63155,
-63168,-63182,-63195,-63208,-63221,-63235,-63248,-63261,
-63274,-63287,-63300,-63313,-63326,-63339,-63352,-63365,
-63378,-63390,-63403,-63416,-63429,-63441,-63454,-63466,
-63479,-63491,-63504,-63516,-63528,-63541,-63553,-63565,
-63578,-63590,-63602,-63614,-63626,-63638,-63650,-63662,
-63674,-63686,-63698,-63709,-63721,-63733,-63745,-63756,
-63768,-63779,-63791,-63803,-63814,-63825,-63837,-63848,
-63859,-63871,-63882,-63893,-63904,-63915,-63927,-63938,
-63949,-63960,-63971,-63981,-63992,-64003,-64014,-64025,
-64035,-64046,-64057,-64067,-64078,-64088,-64099,-64109,
-64120,-64130,-64140,-64151,-64161,-64171,-64181,-64192,
-64202,-64212,-64222,-64232,-64242,-64252,-64261,-64271,
-64281,-64291,-64301,-64310,-64320,-64330,-64339,-64349,
-64358,-64368,-64377,-64387,-64396,-64405,-64414,-64424,
-64433,-64442,-64451,-64460,-64469,-64478,-64487,-64496,
-64505,-64514,-64523,-64532,-64540,-64549,-64558,-64566,
-64575,-64584,-64592,-64601,-64609,-64617,-64626,-64634,
-64642,-64651,-64659,-64667,-64675,-64683,-64691,-64699,
-64707,-64715,-64723,-64731,-64739,-64747,-64754,-64762,
-64770,-64777,-64785,-64793,-64800,-64808,-64815,-64822,
-64830,-64837,-64844,-64852,-64859,-64866,-64873,-64880,
-64887,-64895,-64902,-64908,-64915,-64922,-64929,-64936,
-64943,-64949,-64956,-64963,-64969,-64976,-64982,-64989,
-64995,-65002,-65008,-65015,-65021,-65027,-65033,-65040,
-65046,-65052,-65058,-65064,-65070,-65076,-65082,-65088,
-65094,-65099,-65105,-65111,-65117,-65122,-65128,-65133,
-65139,-65144,-65150,-65155,-65161,-65166,-65171,-65177,
-65182,-65187,-65192,-65197,-65202,-65207,-65212,-65217,
-65222,-65227,-65232,-65237,-65242,-65246,-65251,-65256,
-65260,-65265,-65270,-65274,-65279,-65283,-65287,-65292,
-65296,-65300,-65305,-65309,-65313,-65317,-65321,-65325,
-65329,-65333,-65337,-65341,-65345,-65349,-65352,-65356,
-65360,-65363,-65367,-65371,-65374,-65378,-65381,-65385,
-65388,-65391,-65395,-65398,-65401,-65404,-65408,-65411,
-65414,-65417,-65420,-65423,-65426,-65429,-65431,-65434,
-65437,-65440,-65442,-65445,-65448,-65450,-65453,-65455,
-65458,-65460,-65463,-65465,-65467,-65470,-65472,-65474,
-65476,-65478,-65480,-65482,-65484,-65486,-65488,-65490,
-65492,-65494,-65496,-65497,-65499,-65501,-65502,-65504,
-65505,-65507,-65508,-65510,-65511,-65513,-65514,-65515,
-65516,-65518,-65519,-65520,-65521,-65522,-65523,-65524,
-65525,-65526,-65527,-65527,-65528,-65529,-65530,-65530,
-65531,-65531,-65532,-65532,-65533,-65533,-65534,-65534,
-65534,-65535,-65535,-65535,-65535,-65535,-65535,-65535,
-65535,-65535,-65535,-65535,-65535,-65535,-65535,-65534,
-65534,-65534,-65533,-65533,-65532,-65532,-65531,-65531,
-65530,-65530,-65529,-65528,-65527,-65527,-65526,-65525,
-65524,-65523,-65522,-65521,-65520,-65519,-65518,-65516,
-65515,-65514,-65513,-65511,-65510,-65508,-65507,-65505,
-65504,-65502,-65501,-65499,-65497,-65496,-65494,-65492,
-65490,-65488,-65486,-65484,-65482,-65480,-65478,-65476,
-65474,-65472,-65470,-65467,-65465,-65463,-65460,-65458,
-65455,-65453,-65450,-65448,-65445,-65442,-65440,-65437,
-65434,-65431,-65429,-65426,-65423,-65420,-65417,-65414,
-65411,-65408,-65404,-65401,-65398,-65395,-65391,-65388,
-65385,-65381,-65378,-65374,-65371,-65367,-65363,-65360,
-65356,-65352,-65349,-65345,-65341,-65337,-65333,-65329,
-65325,-65321,-65317,-65313,-65309,-65305,-65300,-65296,
-65292,-65287,-65283,-65279,-65274,-65270,-65265,-65260,
-65256,-65251,-65246,-65242,-65237,-65232,-65227,-65222,
-65217,-65212,-65207,-65202,-65197,-65192,-65187,-65182,
-65177,-65171,-65166,-65161,-65155,-65150,-65144,-65139,
-65133,-65128,-65122,-65117,-65111,-65105,-65099,-65094,
-65088,-65082,-65076,-65070,-65064,-65058,-65052,-65046,
-65040,-65033,-65027,-65021,-65015,-65008,-65002,-64995,
-64989,-64982,-64976,-64969,-64963,-64956,-64949,-64943,
-64936,-64929,-64922,-64915,-64908,-64902,-64895,-64887,
-64880,-64873,-64866,-64859,-64852,-64844,-64837,-64830,
-64822,-64815,-64808,-64800,-64793,-64785,-64777,-64770,
-64762,-64754,-64747,-64739,-64731,-64723,-64715,-64707,
-64699,-64691,-64683,-64675,-64667,-64659,-64651,-64642,
-64634,-64626,-64617,-64609,-64601,-64592,-64584,-64575,
-64566,-64558,-64549,-64540,-64532,-64523,-64514,-64505,
-64496,-64487,-64478,-64469,-64460,-64451,-64442,-64433,
-64424,-64414,-64405,-64396,-64387,-64377,-64368,-64358,
-64349,-64339,-64330,-64320,-64310,-64301,-64291,-64281,
-64271,-64261,-64252,-64242,-64232,-64222,-64212,-64202,
-64192,-64181,-64171,-64161,-64151,-64140,-64130,-64120,
-64109,-64099,-64088,-64078,-64067,-64057,-64046,-64035,
-64025,-64014,-64003,-63992,-63981,-63971,-63960,-63949,
-63938,-63927,-63915,-63904,-63893,-63882,-63871,-63859,
-63848,-63837,-63825,-63814,-63803,-63791,-63779,-63768,
-63756,-63745,-63733,-63721,-63709,-63698,-63686,-63674,
-63662,-63650,-63638,-63626,-63614,-63602,-63590,-63578,
-63565,-63553,-63541,-63528,-63516,-63504,-63491,-63479,
-63466,-63454,-63441,-63429,-63416,-63403,-63390,-63378,
-63365,-63352,-63339,-63326,-63313,-63300,-63287,-63274,
-63261,-63248,-63235,-63221,-63208,-63195,-63182,-63168,
-63155,-63141,-63128,-63114,-63101,-63087,-63074,-63060,
-63046,-63032,-63019,-63005,-62991,-62977,-62963,-62949,
-62935,-62921,-62907,-62893,-62879,-62865,-62850,-62836,
-62822,-62808,-62793,-62779,-62764,-62750,-62735,-62721,
-62706,-62692,-62677,-62662,-62648,-62633,-62618,-62603,
-62588,-62573,-62558,-62543,-62528,-62513,-62498,-62483,
-62468,-62453,-62437,-62422,-62407,-62391,-62376,-62360,
-62345,-62329,-62314,-62298,-62283,-62267,-62251,-62236,
-62220,-62204,-62188,-62172,-62156,-62141,-62125,-62108,
-62092,-62076,-62060,-62044,-62028,-62012,-61995,-61979,
-61963,-61946,-61930,-61913,-61897,-61880,-61864,-61847,
-61831,-61814,-61797,-61780,-61764,-61747,-61730,-61713,
-61696,-61679,-61662,-61645,-61628,-61611,-61594,-61577,
-61559,-61542,-61525,-61507,-61490,-61473,-61455,-61438,
-61420,-61403,-61385,-61367,-61350,-61332,-61314,-61297,
-61279,-61261,-61243,-61225,-61207,-61189,-61171,-61153,
-61135,-61117,-61099,-61081,-61062,-61044,-61026,-61007,
-60989,-60971,-60952,-60934,-60915,-60897,-60878,-60859,
-60841,-60822,-60803,-60785,-60766,-60747,-60728,-60709,
-60690,-60671,-60652,-60633,-60614,-60595,-60576,-60556,
-60537,-60518,-60499,-60479,-60460,-60441,-60421,-60402,
-60382,-60363,-60343,-60323,-60304,-60284,-60264,-60244,
-60225,-60205,-60185,-60165,-60145,-60125,-60105,-60085,
-60065,-60045,-60025,-60004,-59984,-59964,-59944,-59923,
-59903,-59883,-59862,-59842,-59821,-59801,-59780,-59759,
-59739,-59718,-59697,-59677,-59656,-59635,-59614,-59593,
-59572,-59551,-59530,-59509,-59488,-59467,-59446,-59425,
-59404,-59382,-59361,-59340,-59318,-59297,-59276,-59254,
-59233,-59211,-59189,-59168,-59146,-59125,-59103,-59081,
-59059,-59038,-59016,-58994,-58972,-58950,-58928,-58906,
-58884,-58862,-58840,-58818,-58795,-58773,-58751,-58729,
-58706,-58684,-58662,-58639,-58617,-58594,-58572,-58549,
-58527,-58504,-58481,-58459,-58436,-58413,-58390,-58367,
-58345,-58322,-58299,-58276,-58253,-58230,-58207,-58183,
-58160,-58137,-58114,-58091,-58067,-58044,-58021,-57997,
-57974,-57950,-57927,-57903,-57880,-57856,-57833,-57809,
-57785,-57762,-57738,-57714,-57690,-57666,-57642,-57618,
-57594,-57570,-57546,-57522,-57498,-57474,-57450,-57426,
-57402,-57377,-57353,-57329,-57304,-57280,-57255,-57231,
-57206,-57182,-57157,-57133,-57108,-57083,-57059,-57034,
-57009,-56984,-56959,-56935,-56910,-56885,-56860,-56835,
-56810,-56785,-56760,-56734,-56709,-56684,-56659,-56633,
-56608,-56583,-56557,-56532,-56507,-56481,-56456,-56430,
-56404,-56379,-56353,-56328,-56302,-56276,-56250,-56225,
-56199,-56173,-56147,-56121,-56095,-56069,-56043,-56017,
-55991,-55965,-55938,-55912,-55886,-55860,-55833,-55807,
-55781,-55754,-55728,-55701,-55675,-55648,-55622,-55595,
-55569,-55542,-55515,-55489,-55462,-55435,-55408,-55381,
-55354,-55327,-55300,-55274,-55246,-55219,-55192,-55165,
-55138,-55111,-55084,-55056,-55029,-55002,-54974,-54947,
-54920,-54892,-54865,-54837,-54810,-54782,-54755,-54727,
-54699,-54672,-54644,-54616,-54588,-54560,-54533,-54505,
-54477,-54449,-54421,-54393,-54365,-54337,-54308,-54280,
-54252,-54224,-54196,-54167,-54139,-54111,-54082,-54054,
-54026,-53997,-53969,-53940,-53911,-53883,-53854,-53826,
-53797,-53768,-53739,-53711,-53682,-53653,-53624,-53595,
-53566,-53537,-53508,-53479,-53450,-53421,-53392,-53363,
-53334,-53304,-53275,-53246,-53216,-53187,-53158,-53128,
-53099,-53069,-53040,-53010,-52981,-52951,-52922,-52892,
-52862,-52832,-52803,-52773,-52743,-52713,-52683,-52653,
-52624,-52594,-52564,-52534,-52503,-52473,-52443,-52413,
-52383,-52353,-52322,-52292,-52262,-52231,-52201,-52171,
-52140,-52110,-52079,-52049,-52018,-51988,-51957,-51926,
-51896,-51865,-51834,-51803,-51773,-51742,-51711,-51680,
-51649,-51618,-51587,-51556,-51525,-51494,-51463,-51432,
-51401,-51369,-51338,-51307,-51276,-51244,-51213,-51182,
-51150,-51119,-51087,-51056,-51024,-50993,-50961,-50929,
-50898,-50866,-50834,-50803,-50771,-50739,-50707,-50675,
-50644,-50612,-50580,-50548,-50516,-50484,-50452,-50420,
-50387,-50355,-50323,-50291,-50259,-50226,-50194,-50162,
-50129,-50097,-50065,-50032,-50000,-49967,-49935,-49902,
-49869,-49837,-49804,-49771,-49739,-49706,-49673,-49640,
-49608,-49575,-49542,-49509,-49476,-49443,-49410,-49377,
-49344,-49311,-49278,-49244,-49211,-49178,-49145,-49112,
-49078,-49045,-49012,-48978,-48945,-48911,-48878,-48844,
-48811,-48777,-48744,-48710,-48676,-48643,-48609,-48575,
-48542,-48508,-48474,-48440,-48406,-48372,-48338,-48305,
-48271,-48237,-48202,-48168,-48134,-48100,-48066,-48032,
-47998,-47963,-47929,-47895,-47860,-47826,-47792,-47757,
-47723,-47688,-47654,-47619,-47585,-47550,-47516,-47481,
-47446,-47412,-47377,-47342,-47307,-47273,-47238,-47203,
-47168,-47133,-47098,-47063,-47028,-46993,-46958,-46923,
-46888,-46853,-46818,-46783,-46747,-46712,-46677,-46642,
-46606,-46571,-46536,-46500,-46465,-46429,-46394,-46358,
-46323,-46287,-46251,-46216,-46180,-46145,-46109,-46073,
-46037,-46002,-45966,-45930,-45894,-45858,-45822,-45786,
-45750,-45714,-45678,-45642,-45606,-45570,-45534,-45498,
-45462,-45425,-45389,-45353,-45316,-45280,-45244,-45207,
-45171,-45135,-45098,-45062,-45025,-44989,-44952,-44915,
-44879,-44842,-44806,-44769,-44732,-44695,-44659,-44622,
-44585,-44548,-44511,-44474,-44437,-44400,-44363,-44326,
-44289,-44252,-44215,-44178,-44141,-44104,-44067,-44029,
-43992,-43955,-43918,-43880,-43843,-43806,-43768,-43731,
-43693,-43656,-43618,-43581,-43543,-43506,-43468,-43430,
-43393,-43355,-43317,-43280,-43242,-43204,-43166,-43128,
-43091,-43053,-43015,-42977,-42939,-42901,-42863,-42825,
-42787,-42749,-42711,-42672,-42634,-42596,-42558,-42520,
-42481,-42443,-42405,-42366,-42328,-42290,-42251,-42213,
-42174,-42136,-42097,-42059,-42020,-41982,-41943,-41904,
-41866,-41827,-41788,-41750,-41711,-41672,-41633,-41595,
-41556,-41517,-41478,-41439,-41400,-41361,-41322,-41283,
-41244,-41205,-41166,-41127,-41087,-41048,-41009,-40970,
-40931,-40891,-40852,-40813,-40773,-40734,-40695,-40655,
-40616,-40576,-40537,-40497,-40458,-40418,-40379,-40339,
-40299,-40260,-40220,-40180,-40141,-40101,-40061,-40021,
-39982,-39942,-39902,-39862,-39822,-39782,-39742,-39702,
-39662,-39622,-39582,-39542,-39502,-39462,-39422,-39382,
-39341,-39301,-39261,-39221,-39180,-39140,-39100,-39059,
-39019,-38979,-38938,-38898,-38857,-38817,-38776,-38736,
-38695,-38655,-38614,-38573,-38533,-38492,-38451,-38411,
-38370,-38329,-38288,-38248,-38207,-38166,-38125,-38084,
-38043,-38002,-37961,-37920,-37879,-37838,-37797,-37756,
-37715,-37674,-37633,-37592,-37550,-37509,-37468,-37427,
-37386,-37344,-37303,-37262,-37220,-37179,-37137,-37096,
-37055,-37013,-36972,-36930,-36889,-36847,-36805,-36764,
-36722,-36681,-36639,-36597,-36556,-36514,-36472,-36430,
-36388,-36347,-36305,-36263,-36221,-36179,-36137,-36095,
-36053,-36011,-35969,-35927,-35885,-35843,-35801,-35759,
-35717,-35675,-35633,-35590,-35548,-35506,-35464,-35421,
-35379,-35337,-35294,-35252,-35210,-35167,-35125,-35082,
-35040,-34997,-34955,-34912,-34870,-34827,-34785,-34742,
-34699,-34657,-34614,-34571,-34529,-34486,-34443,-34400,
-34358,-34315,-34272,-34229,-34186,-34143,-34100,-34057,
-34015,-33972,-33929,-33886,-33843,-33799,-33756,-33713,
-33670,-33627,-33584,-33541,-33498,-33454,-33411,-33368,
-33325,-33281,-33238,-33195,-33151,-33108,-33065,-33021,
-32978,-32934,-32891,-32847,-32804,-32760,-32717,-32673,
-32630,-32586,-32542,-32499,-32455,-32411,-32368,-32324,
-32280,-32236,-32193,-32149,-32105,-32061,-32017,-31974,
-31930,-31886,-31842,-31798,-31754,-31710,-31666,-31622,
-31578,-31534,-31490,-31446,-31402,-31357,-31313,-31269,
-31225,-31181,-31136,-31092,-31048,-31004,-30959,-30915,
-30871,-30826,-30782,-30738,-30693,-30649,-30604,-30560,
-30515,-30471,-30426,-30382,-30337,-30293,-30248,-30204,
-30159,-30114,-30070,-30025,-29980,-29936,-29891,-29846,
-29801,-29757,-29712,-29667,-29622,-29577,-29533,-29488,
-29443,-29398,-29353,-29308,-29263,-29218,-29173,-29128,
-29083,-29038,-28993,-28948,-28903,-28858,-28812,-28767,
-28722,-28677,-28632,-28586,-28541,-28496,-28451,-28405,
-28360,-28315,-28269,-28224,-28179,-28133,-28088,-28042,
-27997,-27952,-27906,-27861,-27815,-27770,-27724,-27678,
-27633,-27587,-27542,-27496,-27450,-27405,-27359,-27313,
-27268,-27222,-27176,-27131,-27085,-27039,-26993,-26947,
-26902,-26856,-26810,-26764,-26718,-26672,-26626,-26580,
-26534,-26488,-26442,-26396,-26350,-26304,-26258,-26212,
-26166,-26120,-26074,-26028,-25982,-25936,-25889,-25843,
-25797,-25751,-25705,-25658,-25612,-25566,-25520,-25473,
-25427,-25381,-25334,-25288,-25241,-25195,-25149,-25102,
-25056,-25009,-24963,-24916,-24870,-24823,-24777,-24730,
-24684,-24637,-24591,-24544,-24497,-24451,-24404,-24357,
-24311,-24264,-24217,-24171,-24124,-24077,-24030,-23984,
-23937,-23890,-23843,-23796,-23750,-23703,-23656,-23609,
-23562,-23515,-23468,-23421,-23374,-23327,-23280,-23233,
-23186,-23139,-23092,-23045,-22998,-22951,-22904,-22857,
-22810,-22763,-22716,-22668,-22621,-22574,-22527,-22480,
-22432,-22385,-22338,-22291,-22243,-22196,-22149,-22102,
-22054,-22007,-21960,-21912,-21865,-21817,-21770,-21723,
-21675,-21628,-21580,-21533,-21485,-21438,-21390,-21343,
-21295,-21248,-21200,-21153,-21105,-21057,-21010,-20962,
-20915,-20867,-20819,-20772,-20724,-20676,-20629,-20581,
-20533,-20485,-20438,-20390,-20342,-20294,-20246,-20199,
-20151,-20103,-20055,-20007,-19959,-19912,-19864,-19816,
-19768,-19720,-19672,-19624,-19576,-19528,-19480,-19432,
-19384,-19336,-19288,-19240,-19192,-19144,-19096,-19048,
-19000,-18951,-18903,-18855,-18807,-18759,-18711,-18663,
-18614,-18566,-18518,-18470,-18421,-18373,-18325,-18277,
-18228,-18180,-18132,-18084,-18035,-17987,-17939,-17890,
-17842,-17793,-17745,-17697,-17648,-17600,-17551,-17503,
-17455,-17406,-17358,-17309,-17261,-17212,-17164,-17115,
-17067,-17018,-16970,-16921,-16872,-16824,-16775,-16727,
-16678,-16629,-16581,-16532,-16484,-16435,-16386,-16338,
-16289,-16240,-16191,-16143,-16094,-16045,-15997,-15948,
-15899,-15850,-15802,-15753,-15704,-15655,-15606,-15557,
-15509,-15460,-15411,-15362,-15313,-15264,-15215,-15167,
-15118,-15069,-15020,-14971,-14922,-14873,-14824,-14775,
-14726,-14677,-14628,-14579,-14530,-14481,-14432,-14383,
-14334,-14285,-14236,-14187,-14138,-14089,-14040,-13990,
-13941,-13892,-13843,-13794,-13745,-13696,-13647,-13597,
-13548,-13499,-13450,-13401,-13351,-13302,-13253,-13204,
-13154,-13105,-13056,-13007,-12957,-12908,-12859,-12810,
-12760,-12711,-12662,-12612,-12563,-12514,-12464,-12415,
-12366,-12316,-12267,-12217,-12168,-12119,-12069,-12020,
-11970,-11921,-11872,-11822,-11773,-11723,-11674,-11624,
-11575,-11525,-11476,-11426,-11377,-11327,-11278,-11228,
-11179,-11129,-11080,-11030,-10981,-10931,-10882,-10832,
-10782,-10733,-10683,-10634,-10584,-10534,-10485,-10435,
-10386,-10336,-10286,-10237,-10187,-10137,-10088,-10038,
-9988,-9939,-9889,-9839,-9790,-9740,-9690,-9640,
-9591,-9541,-9491,-9442,-9392,-9342,-9292,-9243,
-9193,-9143,-9093,-9043,-8994,-8944,-8894,-8844,
-8794,-8745,-8695,-8645,-8595,-8545,-8496,-8446,
-8396,-8346,-8296,-8246,-8196,-8147,-8097,-8047,
-7997,-7947,-7897,-7847,-7797,-7747,-7697,-7648,
-7598,-7548,-7498,-7448,-7398,-7348,-7298,-7248,
-7198,-7148,-7098,-7048,-6998,-6948,-6898,-6848,
-6798,-6748,-6698,-6648,-6598,-6548,-6498,-6448,
-6398,-6348,-6298,-6248,-6198,-6148,-6098,-6048,
-5998,-5948,-5898,-5848,-5798,-5747,-5697,-5647,
-5597,-5547,-5497,-5447,-5397,-5347,-5297,-5247,
-5197,-5146,-5096,-5046,-4996,-4946,-4896,-4846,
-4796,-4745,-4695,-4645,-4595,-4545,-4495,-4445,
-4394,-4344,-4294,-4244,-4194,-4144,-4093,-4043,
-3993,-3943,-3893,-3843,-3792,-3742,-3692,-3642,
-3592,-3541,-3491,-3441,-3391,-3341,-3291,-3240,
-3190,-3140,-3090,-3039,-2989,-2939,-2889,-2839,
-2788,-2738,-2688,-2638,-2588,-2537,-2487,-2437,
-2387,-2336,-2286,-2236,-2186,-2135,-2085,-2035,
-1985,-1934,-1884,-1834,-1784,-1733,-1683,-1633,
-1583,-1532,-1482,-1432,-1382,-1331,-1281,-1231,
-1181,-1130,-1080,-1030,-980,-929,-879,-829,
-779,-728,-678,-628,-578,-527,-477,-427,
-376,-326,-276,-226,-175,-125,-75,-25,
25,75,125,175,226,276,326,376,
427,477,527,578,628,678,728,779,
829,879,929,980,1030,1080,1130,1181,
1231,1281,1331,1382,1432,1482,1532,1583,
1633,1683,1733,1784,1834,1884,1934,1985,
2035,2085,2135,2186,2236,2286,2336,2387,
2437,2487,2537,2587,2638,2688,2738,2788,
2839,2889,2939,2989,3039,3090,3140,3190,
3240,3291,3341,3391,3441,3491,3542,3592,
3642,3692,3742,3792,3843,3893,3943,3993,
4043,4093,4144,4194,4244,4294,4344,4394,
4445,4495,4545,4595,4645,4695,4745,4796,
4846,4896,4946,4996,5046,5096,5146,5197,
5247,5297,5347,5397,5447,5497,5547,5597,
5647,5697,5747,5798,5848,5898,5948,5998,
6048,6098,6148,6198,6248,6298,6348,6398,
6448,6498,6548,6598,6648,6698,6748,6798,
6848,6898,6948,6998,7048,7098,7148,7198,
7248,7298,7348,7398,7448,7498,7548,7598,
7648,7697,7747,7797,7847,7897,7947,7997,
8047,8097,8147,8196,8246,8296,8346,8396,
8446,8496,8545,8595,8645,8695,8745,8794,
8844,8894,8944,8994,9043,9093,9143,9193,
9243,9292,9342,9392,9442,9491,9541,9591,
9640,9690,9740,9790,9839,9889,9939,9988,
10038,10088,10137,10187,10237,10286,10336,10386,
10435,10485,10534,10584,10634,10683,10733,10782,
10832,10882,10931,10981,11030,11080,11129,11179,
11228,11278,11327,11377,11426,11476,11525,11575,
11624,11674,11723,11773,11822,11872,11921,11970,
12020,12069,12119,12168,12218,12267,12316,12366,
12415,12464,12514,12563,12612,12662,12711,12760,
12810,12859,12908,12957,13007,13056,13105,13154,
13204,13253,13302,13351,13401,13450,13499,13548,
13597,13647,13696,13745,13794,13843,13892,13941,
13990,14040,14089,14138,14187,14236,14285,14334,
14383,14432,14481,14530,14579,14628,14677,14726,
14775,14824,14873,14922,14971,15020,15069,15118,
15167,15215,15264,15313,15362,15411,15460,15509,
15557,15606,15655,15704,15753,15802,15850,15899,
15948,15997,16045,16094,16143,16191,16240,16289,
16338,16386,16435,16484,16532,16581,16629,16678,
16727,16775,16824,16872,16921,16970,17018,17067,
17115,17164,17212,17261,17309,17358,17406,17455,
17503,17551,17600,17648,17697,17745,17793,17842,
17890,17939,17987,18035,18084,18132,18180,18228,
18277,18325,18373,18421,18470,18518,18566,18614,
18663,18711,18759,18807,18855,18903,18951,19000,
19048,19096,19144,19192,19240,19288,19336,19384,
19432,19480,19528,19576,19624,19672,19720,19768,
19816,19864,19912,19959,20007,20055,20103,20151,
20199,20246,20294,20342,20390,20438,20485,20533,
20581,20629,20676,20724,20772,20819,20867,20915,
20962,21010,21057,21105,21153,21200,21248,21295,
21343,21390,21438,21485,21533,21580,21628,21675,
21723,21770,21817,21865,21912,21960,22007,22054,
22102,22149,22196,22243,22291,22338,22385,22432,
22480,22527,22574,22621,22668,22716,22763,22810,
22857,22904,22951,22998,23045,23092,23139,23186,
23233,23280,23327,23374,23421,23468,23515,23562,
23609,23656,23703,23750,23796,23843,23890,23937,
23984,24030,24077,24124,24171,24217,24264,24311,
24357,24404,24451,24497,24544,24591,24637,24684,
24730,24777,24823,24870,24916,24963,25009,25056,
25102,25149,25195,25241,25288,25334,25381,25427,
25473,25520,25566,25612,25658,25705,25751,25797,
25843,25889,25936,25982,26028,26074,26120,26166,
26212,26258,26304,26350,26396,26442,26488,26534,
26580,26626,26672,26718,26764,26810,26856,26902,
26947,26993,27039,27085,27131,27176,27222,27268,
27313,27359,27405,27450,27496,27542,27587,27633,
27678,27724,27770,27815,27861,27906,27952,27997,
28042,28088,28133,28179,28224,28269,28315,28360,
28405,28451,28496,28541,28586,28632,28677,28722,
28767,28812,28858,28903,28948,28993,29038,29083,
29128,29173,29218,29263,29308,29353,29398,29443,
29488,29533,29577,29622,29667,29712,29757,29801,
29846,29891,29936,29980,30025,30070,30114,30159,
30204,30248,30293,30337,30382,30427,30471,30516,
30560,30604,30649,30693,30738,30782,30826,30871,
30915,30959,31004,31048,31092,31136,31181,31225,
31269,31313,31357,31402,31446,31490,31534,31578,
31622,31666,31710,31754,31798,31842,31886,31930,
31974,32017,32061,32105,32149,32193,32236,32280,
32324,32368,32411,32455,32499,32542,32586,32630,
32673,32717,32760,32804,32847,32891,32934,32978,
33021,33065,33108,33151,33195,33238,33281,33325,
33368,33411,33454,33498,33541,33584,33627,33670,
33713,33756,33799,33843,33886,33929,33972,34015,
34057,34100,34143,34186,34229,34272,34315,34358,
34400,34443,34486,34529,34571,34614,34657,34699,
34742,34785,34827,34870,34912,34955,34997,35040,
35082,35125,35167,35210,35252,35294,35337,35379,
35421,35464,35506,35548,35590,35633,35675,35717,
35759,35801,35843,35885,35927,35969,36011,36053,
36095,36137,36179,36221,36263,36305,36347,36388,
36430,36472,36514,36556,36597,36639,36681,36722,
36764,36805,36847,36889,36930,36972,37013,37055,
37096,37137,37179,37220,37262,37303,37344,37386,
37427,37468,37509,37551,37592,37633,37674,37715,
37756,37797,37838,37879,37920,37961,38002,38043,
38084,38125,38166,38207,38248,38288,38329,38370,
38411,38451,38492,38533,38573,38614,38655,38695,
38736,38776,38817,38857,38898,38938,38979,39019,
39059,39100,39140,39180,39221,39261,39301,39341,
39382,39422,39462,39502,39542,39582,39622,39662,
39702,39742,39782,39822,39862,39902,39942,39982,
40021,40061,40101,40141,40180,40220,40260,40299,
40339,40379,40418,40458,40497,40537,40576,40616,
40655,40695,40734,40773,40813,40852,40891,40931,
40970,41009,41048,41087,41127,41166,41205,41244,
41283,41322,41361,41400,41439,41478,41517,41556,
41595,41633,41672,41711,41750,41788,41827,41866,
41904,41943,41982,42020,42059,42097,42136,42174,
42213,42251,42290,42328,42366,42405,42443,42481,
42520,42558,42596,42634,42672,42711,42749,42787,
42825,42863,42901,42939,42977,43015,43053,43091,
43128,43166,43204,43242,43280,43317,43355,43393,
43430,43468,43506,43543,43581,43618,43656,43693,
43731,43768,43806,43843,43880,43918,43955,43992,
44029,44067,44104,44141,44178,44215,44252,44289,
44326,44363,44400,44437,44474,44511,44548,44585,
44622,44659,44695,44732,44769,44806,44842,44879,
44915,44952,44989,45025,45062,45098,45135,45171,
45207,45244,45280,45316,45353,45389,45425,45462,
45498,45534,45570,45606,45642,45678,45714,45750,
45786,45822,45858,45894,45930,45966,46002,46037,
46073,46109,46145,46180,46216,46252,46287,46323,
46358,46394,46429,46465,46500,46536,46571,46606,
46642,46677,46712,46747,46783,46818,46853,46888,
46923,46958,46993,47028,47063,47098,47133,47168,
47203,47238,47273,47308,47342,47377,47412,47446,
47481,47516,47550,47585,47619,47654,47688,47723,
47757,47792,47826,47861,47895,47929,47963,47998,
48032,48066,48100,48134,48168,48202,48237,48271,
48305,48338,48372,48406,48440,48474,48508,48542,
48575,48609,48643,48676,48710,48744,48777,48811,
48844,48878,48911,48945,48978,49012,49045,49078,
49112,49145,49178,49211,49244,49278,49311,49344,
49377,49410,49443,49476,49509,49542,49575,49608,
49640,49673,49706,49739,49771,49804,49837,49869,
49902,49935,49967,50000,50032,50064,50097,50129,
50162,50194,50226,50259,50291,50323,50355,50387,
50420,50452,50484,50516,50548,50580,50612,50644,
50675,50707,50739,50771,50803,50834,50866,50898,
50929,50961,50993,51024,51056,51087,51119,51150,
51182,51213,51244,51276,51307,51338,51369,51401,
51432,51463,51494,51525,51556,51587,51618,51649,
51680,51711,51742,51773,51803,51834,51865,51896,
51926,51957,51988,52018,52049,52079,52110,52140,
52171,52201,52231,52262,52292,52322,52353,52383,
52413,52443,52473,52503,52534,52564,52594,52624,
52653,52683,52713,52743,52773,52803,52832,52862,
52892,52922,52951,52981,53010,53040,53069,53099,
53128,53158,53187,53216,53246,53275,53304,53334,
53363,53392,53421,53450,53479,53508,53537,53566,
53595,53624,53653,53682,53711,53739,53768,53797,
53826,53854,53883,53912,53940,53969,53997,54026,
54054,54082,54111,54139,54167,54196,54224,54252,
54280,54309,54337,54365,54393,54421,54449,54477,
54505,54533,54560,54588,54616,54644,54672,54699,
54727,54755,54782,54810,54837,54865,54892,54920,
54947,54974,55002,55029,55056,55084,55111,55138,
55165,55192,55219,55246,55274,55300,55327,55354,
55381,55408,55435,55462,55489,55515,55542,55569,
55595,55622,55648,55675,55701,55728,55754,55781,
55807,55833,55860,55886,55912,55938,55965,55991,
56017,56043,56069,56095,56121,56147,56173,56199,
56225,56250,56276,56302,56328,56353,56379,56404,
56430,56456,56481,56507,56532,56557,56583,56608,
56633,56659,56684,56709,56734,56760,56785,56810,
56835,56860,56885,56910,56935,56959,56984,57009,
57034,57059,57083,57108,57133,57157,57182,57206,
57231,57255,57280,57304,57329,57353,57377,57402,
57426,57450,57474,57498,57522,57546,57570,57594,
57618,57642,57666,57690,57714,57738,57762,57785,
57809,57833,57856,57880,57903,57927,57950,57974,
57997,58021,58044,58067,58091,58114,58137,58160,
58183,58207,58230,58253,58276,58299,58322,58345,
58367,58390,58413,58436,58459,58481,58504,58527,
58549,58572,58594,58617,58639,58662,58684,58706,
58729,58751,58773,58795,58818,58840,58862,58884,
58906,58928,58950,58972,58994,59016,59038,59059,
59081,59103,59125,59146,59168,59190,59211,59233,
59254,59276,59297,59318,59340,59361,59382,59404,
59425,59446,59467,59488,59509,59530,59551,59572,
59593,59614,59635,59656,59677,59697,59718,59739,
59759,59780,59801,59821,59842,59862,59883,59903,
59923,59944,59964,59984,60004,60025,60045,60065,
60085,60105,60125,60145,60165,60185,60205,60225,
60244,60264,60284,60304,60323,60343,60363,60382,
60402,60421,60441,60460,60479,60499,60518,60537,
60556,60576,60595,60614,60633,60652,60671,60690,
60709,60728,60747,60766,60785,60803,60822,60841,
60859,60878,60897,60915,60934,60952,60971,60989,
61007,61026,61044,61062,61081,61099,61117,61135,
61153,61171,61189,61207,61225,61243,61261,61279,
61297,61314,61332,61350,61367,61385,61403,61420,
61438,61455,61473,61490,61507,61525,61542,61559,
61577,61594,61611,61628,61645,61662,61679,61696,
61713,61730,61747,61764,61780,61797,61814,61831,
61847,61864,61880,61897,61913,61930,61946,61963,
61979,61995,62012,62028,62044,62060,62076,62092,
62108,62125,62141,62156,62172,62188,62204,62220,
62236,62251,62267,62283,62298,62314,62329,62345,
62360,62376,62391,62407,62422,62437,62453,62468,
62483,62498,62513,62528,62543,62558,62573,62588,
62603,62618,62633,62648,62662,62677,62692,62706,
62721,62735,62750,62764,62779,62793,62808,62822,
62836,62850,62865,62879,62893,62907,62921,62935,
62949,62963,62977,62991,63005,63019,63032,63046,
63060,63074,63087,63101,63114,63128,63141,63155,
63168,63182,63195,63208,63221,63235,63248,63261,
63274,63287,63300,63313,63326,63339,63352,63365,
63378,63390,63403,63416,63429,63441,63454,63466,
63479,63491,63504,63516,63528,63541,63553,63565,
63578,63590,63602,63614,63626,63638,63650,63662,
63674,63686,63698,63709,63721,63733,63745,63756,
63768,63779,63791,63803,63814,63825,63837,63848,
63859,63871,63882,63893,63904,63915,63927,63938,
63949,63960,63971,63981,63992,64003,64014,64025,
64035,64046,64057,64067,64078,64088,64099,64109,
64120,64130,64140,64151,64161,64171,64181,64192,
64202,64212,64222,64232,64242,64252,64261,64271,
64281,64291,64301,64310,64320,64330,64339,64349,
64358,64368,64377,64387,64396,64405,64414,64424,
64433,64442,64451,64460,64469,64478,64487,64496,
64505,64514,64523,64532,64540,64549,64558,64566,
64575,64584,64592,64600,64609,64617,64626,64634,
64642,64651,64659,64667,64675,64683,64691,64699,
64707,64715,64723,64731,64739,64747,64754,64762,
64770,64777,64785,64793,64800,64808,64815,64822,
64830,64837,64844,64852,64859,64866,64873,64880,
64887,64895,64902,64908,64915,64922,64929,64936,
64943,64949,64956,64963,64969,64976,64982,64989,
64995,65002,65008,65015,65021,65027,65033,65040,
65046,65052,65058,65064,65070,65076,65082,65088,
65094,65099,65105,65111,65117,65122,65128,65133,
65139,65144,65150,65155,65161,65166,65171,65177,
65182,65187,65192,65197,65202,65207,65212,65217,
65222,65227,65232,65237,65242,65246,65251,65256,
65260,65265,65270,65274,65279,65283,65287,65292,
65296,65300,65305,65309,65313,65317,65321,65325,
65329,65333,65337,65341,65345,65349,65352,65356,
65360,65363,65367,65371,65374,65378,65381,65385,
65388,65391,65395,65398,65401,65404,65408,65411,
65414,65417,65420,65423,65426,65429,65431,65434,
65437,65440,65442,65445,65448,65450,65453,65455,
65458,65460,65463,65465,65467,65470,65472,65474,
65476,65478,65480,65482,65484,65486,65488,65490,
65492,65494,65496,65497,65499,65501,65502,65504,
65505,65507,65508,65510,65511,65513,65514,65515,
65516,65518,65519,65520,65521,65522,65523,65524,
65525,65526,65527,65527,65528,65529,65530,65530,
65531,65531,65532,65532,65533,65533,65534,65534,
65534,65535,65535,65535,65535,65535,65535,65535
};
#endif
#ifdef TABLES_AS_LUMPS
angle_t *tantoangle;
#else
const angle_t tantoangle[2049] = {
0,333772,667544,1001315,1335086,1668857,2002626,2336395,
2670163,3003929,3337694,3671457,4005219,4338979,4672736,5006492,
5340245,5673995,6007743,6341488,6675230,7008968,7342704,7676435,
8010164,8343888,8677609,9011325,9345037,9678744,10012447,10346145,
10679838,11013526,11347209,11680887,12014558,12348225,12681885,13015539,
13349187,13682829,14016464,14350092,14683714,15017328,15350936,15684536,
16018129,16351714,16685291,17018860,17352422,17685974,18019518,18353054,
18686582,19020100,19353610,19687110,20020600,20354080,20687552,21021014,
21354466,21687906,22021338,22354758,22688168,23021568,23354956,23688332,
24021698,24355052,24688396,25021726,25355046,25688352,26021648,26354930,
26688200,27021456,27354702,27687932,28021150,28354356,28687548,29020724,
29353888,29687038,30020174,30353296,30686404,31019496,31352574,31685636,
32018684,32351718,32684734,33017736,33350722,33683692,34016648,34349584,
34682508,35015412,35348300,35681172,36014028,36346868,36679688,37012492,
37345276,37678044,38010792,38343524,38676240,39008936,39341612,39674272,
40006912,40339532,40672132,41004716,41337276,41669820,42002344,42334848,
42667332,42999796,43332236,43664660,43997060,44329444,44661800,44994140,
45326456,45658752,45991028,46323280,46655512,46987720,47319908,47652072,
47984212,48316332,48648428,48980500,49312548,49644576,49976580,50308556,
50640512,50972444,51304352,51636236,51968096,52299928,52631740,52963524,
53295284,53627020,53958728,54290412,54622068,54953704,55285308,55616888,
55948444,56279972,56611472,56942948,57274396,57605816,57937212,58268576,
58599916,58931228,59262512,59593768,59924992,60256192,60587364,60918508,
61249620,61580704,61911760,62242788,62573788,62904756,63235692,63566604,
63897480,64228332,64559148,64889940,65220696,65551424,65882120,66212788,
66543420,66874024,67204600,67535136,67865648,68196120,68526568,68856984,
69187360,69517712,69848024,70178304,70508560,70838776,71168960,71499112,
71829224,72159312,72489360,72819376,73149360,73479304,73809216,74139096,
74468936,74798744,75128520,75458264,75787968,76117632,76447264,76776864,
77106424,77435952,77765440,78094888,78424304,78753688,79083032,79412336,
79741608,80070840,80400032,80729192,81058312,81387392,81716432,82045440,
82374408,82703336,83032224,83361080,83689896,84018664,84347400,84676096,
85004760,85333376,85661952,85990488,86318984,86647448,86975864,87304240,
87632576,87960872,88289128,88617344,88945520,89273648,89601736,89929792,
90257792,90585760,90913688,91241568,91569408,91897200,92224960,92552672,
92880336,93207968,93535552,93863088,94190584,94518040,94845448,95172816,
95500136,95827416,96154648,96481832,96808976,97136080,97463136,97790144,
98117112,98444032,98770904,99097736,99424520,99751256,100077944,100404592,
100731192,101057744,101384248,101710712,102037128,102363488,102689808,103016080,
103342312,103668488,103994616,104320696,104646736,104972720,105298656,105624552,
105950392,106276184,106601928,106927624,107253272,107578872,107904416,108229920,
108555368,108880768,109206120,109531416,109856664,110181872,110507016,110832120,
111157168,111482168,111807112,112132008,112456856,112781648,113106392,113431080,
113755720,114080312,114404848,114729328,115053760,115378136,115702464,116026744,
116350960,116675128,116999248,117323312,117647320,117971272,118295176,118619024,
118942816,119266560,119590248,119913880,120237456,120560984,120884456,121207864,
121531224,121854528,122177784,122500976,122824112,123147200,123470224,123793200,
124116120,124438976,124761784,125084528,125407224,125729856,126052432,126374960,
126697424,127019832,127342184,127664472,127986712,128308888,128631008,128953072,
129275080,129597024,129918912,130240744,130562520,130884232,131205888,131527480,
131849016,132170496,132491912,132813272,133134576,133455816,133776992,134098120,
134419184,134740176,135061120,135382000,135702816,136023584,136344272,136664912,
136985488,137306016,137626464,137946864,138267184,138587456,138907664,139227808,
139547904,139867920,140187888,140507776,140827616,141147392,141467104,141786752,
142106336,142425856,142745312,143064720,143384048,143703312,144022512,144341664,
144660736,144979744,145298704,145617584,145936400,146255168,146573856,146892480,
147211040,147529536,147847968,148166336,148484640,148802880,149121056,149439152,
149757200,150075168,150393072,150710912,151028688,151346400,151664048,151981616,
152299136,152616576,152933952,153251264,153568496,153885680,154202784,154519824,
154836784,155153696,155470528,155787296,156104000,156420624,156737200,157053696,
157370112,157686480,158002768,158318976,158635136,158951216,159267232,159583168,
159899040,160214848,160530592,160846256,161161840,161477376,161792832,162108208,
162423520,162738768,163053952,163369040,163684080,163999040,164313936,164628752,
164943504,165258176,165572784,165887312,166201776,166516160,166830480,167144736,
167458912,167773008,168087040,168400992,168714880,169028688,169342432,169656096,
169969696,170283216,170596672,170910032,171223344,171536576,171849728,172162800,
172475808,172788736,173101600,173414384,173727104,174039728,174352288,174664784,
174977200,175289536,175601792,175913984,176226096,176538144,176850096,177161984,
177473792,177785536,178097200,178408784,178720288,179031728,179343088,179654368,
179965568,180276704,180587744,180898720,181209616,181520448,181831184,182141856,
182452448,182762960,183073408,183383760,183694048,184004240,184314368,184624416,
184934400,185244288,185554096,185863840,186173504,186483072,186792576,187102000,
187411344,187720608,188029808,188338912,188647936,188956896,189265760,189574560,
189883264,190191904,190500448,190808928,191117312,191425632,191733872,192042016,
192350096,192658096,192966000,193273840,193581584,193889264,194196848,194504352,
194811792,195119136,195426400,195733584,196040688,196347712,196654656,196961520,
197268304,197574992,197881616,198188144,198494592,198800960,199107248,199413456,
199719584,200025616,200331584,200637456,200943248,201248960,201554576,201860128,
202165584,202470960,202776256,203081456,203386592,203691632,203996592,204301472,
204606256,204910976,205215600,205520144,205824592,206128960,206433248,206737456,
207041584,207345616,207649568,207953424,208257216,208560912,208864512,209168048,
209471488,209774832,210078112,210381296,210684384,210987408,211290336,211593184,
211895936,212198608,212501184,212803680,213106096,213408432,213710672,214012816,
214314880,214616864,214918768,215220576,215522288,215823920,216125472,216426928,
216728304,217029584,217330784,217631904,217932928,218233856,218534704,218835472,
219136144,219436720,219737216,220037632,220337952,220638192,220938336,221238384,
221538352,221838240,222138032,222437728,222737344,223036880,223336304,223635664,
223934912,224234096,224533168,224832160,225131072,225429872,225728608,226027232,
226325776,226624240,226922608,227220880,227519056,227817152,228115168,228413088,
228710912,229008640,229306288,229603840,229901312,230198688,230495968,230793152,
231090256,231387280,231684192,231981024,232277760,232574416,232870960,233167440,
233463808,233760096,234056288,234352384,234648384,234944304,235240128,235535872,
235831504,236127056,236422512,236717888,237013152,237308336,237603424,237898416,
238193328,238488144,238782864,239077488,239372016,239666464,239960816,240255072,
240549232,240843312,241137280,241431168,241724960,242018656,242312256,242605776,
242899200,243192512,243485744,243778896,244071936,244364880,244657744,244950496,
245243168,245535744,245828224,246120608,246412912,246705104,246997216,247289216,
247581136,247872960,248164688,248456320,248747856,249039296,249330640,249621904,
249913056,250204128,250495088,250785968,251076736,251367424,251658016,251948512,
252238912,252529200,252819408,253109520,253399536,253689456,253979280,254269008,
254558640,254848176,255137632,255426976,255716224,256005376,256294432,256583392,
256872256,257161024,257449696,257738272,258026752,258315136,258603424,258891600,
259179696,259467696,259755600,260043392,260331104,260618704,260906224,261193632,
261480960,261768176,262055296,262342320,262629248,262916080,263202816,263489456,
263776000,264062432,264348784,264635024,264921168,265207216,265493168,265779024,
266064784,266350448,266636000,266921472,267206832,267492096,267777264,268062336,
268347312,268632192,268916960,269201632,269486208,269770688,270055072,270339360,
270623552,270907616,271191616,271475488,271759296,272042976,272326560,272610048,
272893440,273176736,273459936,273743040,274026048,274308928,274591744,274874432,
275157024,275439520,275721920,276004224,276286432,276568512,276850528,277132416,
277414240,277695936,277977536,278259040,278540448,278821728,279102944,279384032,
279665056,279945952,280226752,280507456,280788064,281068544,281348960,281629248,
281909472,282189568,282469568,282749440,283029248,283308960,283588544,283868032,
284147424,284426720,284705920,284985024,285264000,285542912,285821696,286100384,
286378976,286657440,286935840,287214112,287492320,287770400,288048384,288326240,
288604032,288881696,289159264,289436768,289714112,289991392,290268576,290545632,
290822592,291099456,291376224,291652896,291929440,292205888,292482272,292758528,
293034656,293310720,293586656,293862496,294138240,294413888,294689440,294964864,
295240192,295515424,295790560,296065600,296340512,296615360,296890080,297164704,
297439200,297713632,297987936,298262144,298536256,298810240,299084160,299357952,
299631648,299905248,300178720,300452128,300725408,300998592,301271680,301544640,
301817536,302090304,302362976,302635520,302908000,303180352,303452608,303724768,
303996800,304268768,304540608,304812320,305083968,305355520,305626944,305898272,
306169472,306440608,306711616,306982528,307253344,307524064,307794656,308065152,
308335552,308605856,308876032,309146112,309416096,309685984,309955744,310225408,
310494976,310764448,311033824,311303072,311572224,311841280,312110208,312379040,
312647776,312916416,313184960,313453376,313721696,313989920,314258016,314526016,
314793920,315061728,315329408,315597024,315864512,316131872,316399168,316666336,
316933408,317200384,317467232,317733984,318000640,318267200,318533632,318799968,
319066208,319332352,319598368,319864288,320130112,320395808,320661408,320926912,
321192320,321457632,321722816,321987904,322252864,322517760,322782528,323047200,
323311744,323576192,323840544,324104800,324368928,324632992,324896928,325160736,
325424448,325688096,325951584,326215008,326478304,326741504,327004608,327267584,
327530464,327793248,328055904,328318496,328580960,328843296,329105568,329367712,
329629760,329891680,330153536,330415264,330676864,330938400,331199808,331461120,
331722304,331983392,332244384,332505280,332766048,333026752,333287296,333547776,
333808128,334068384,334328544,334588576,334848512,335108352,335368064,335627712,
335887200,336146624,336405920,336665120,336924224,337183200,337442112,337700864,
337959552,338218112,338476576,338734944,338993184,339251328,339509376,339767296,
340025120,340282848,340540480,340797984,341055392,341312704,341569888,341826976,
342083968,342340832,342597600,342854272,343110848,343367296,343623648,343879904,
344136032,344392064,344648000,344903808,345159520,345415136,345670656,345926048,
346181344,346436512,346691616,346946592,347201440,347456224,347710880,347965440,
348219872,348474208,348728448,348982592,349236608,349490528,349744320,349998048,
350251648,350505152,350758528,351011808,351264992,351518048,351771040,352023872,
352276640,352529280,352781824,353034272,353286592,353538816,353790944,354042944,
354294880,354546656,354798368,355049952,355301440,355552800,355804096,356055264,
356306304,356557280,356808128,357058848,357309504,357560032,357810464,358060768,
358311008,358561088,358811104,359060992,359310784,359560480,359810048,360059520,
360308896,360558144,360807296,361056352,361305312,361554144,361802880,362051488,
362300032,362548448,362796736,363044960,363293056,363541024,363788928,364036704,
364284384,364531936,364779392,365026752,365274016,365521152,365768192,366015136,
366261952,366508672,366755296,367001792,367248192,367494496,367740704,367986784,
368232768,368478656,368724416,368970080,369215648,369461088,369706432,369951680,
370196800,370441824,370686752,370931584,371176288,371420896,371665408,371909792,
372154080,372398272,372642336,372886304,373130176,373373952,373617600,373861152,
374104608,374347936,374591168,374834304,375077312,375320224,375563040,375805760,
376048352,376290848,376533248,376775520,377017696,377259776,377501728,377743584,
377985344,378227008,378468544,378709984,378951328,379192544,379433664,379674688,
379915584,380156416,380397088,380637696,380878176,381118560,381358848,381599040,
381839104,382079072,382318912,382558656,382798304,383037856,383277280,383516640,
383755840,383994976,384233984,384472896,384711712,384950400,385188992,385427488,
385665888,385904160,386142336,386380384,386618368,386856224,387093984,387331616,
387569152,387806592,388043936,388281152,388518272,388755296,388992224,389229024,
389465728,389702336,389938816,390175200,390411488,390647680,390883744,391119712,
391355584,391591328,391826976,392062528,392297984,392533312,392768544,393003680,
393238720,393473632,393708448,393943168,394177760,394412256,394646656,394880960,
395115136,395349216,395583200,395817088,396050848,396284512,396518080,396751520,
396984864,397218112,397451264,397684288,397917248,398150080,398382784,398615424,
398847936,399080320,399312640,399544832,399776928,400008928,400240832,400472608,
400704288,400935872,401167328,401398720,401629984,401861120,402092192,402323136,
402553984,402784736,403015360,403245888,403476320,403706656,403936896,404167008,
404397024,404626944,404856736,405086432,405316032,405545536,405774912,406004224,
406233408,406462464,406691456,406920320,407149088,407377760,407606336,407834784,
408063136,408291392,408519520,408747584,408975520,409203360,409431072,409658720,
409886240,410113664,410340992,410568192,410795296,411022304,411249216,411476032,
411702720,411929312,412155808,412382176,412608480,412834656,413060736,413286720,
413512576,413738336,413964000,414189568,414415040,414640384,414865632,415090784,
415315840,415540800,415765632,415990368,416215008,416439552,416663968,416888288,
417112512,417336640,417560672,417784576,418008384,418232096,418455712,418679200,
418902624,419125920,419349120,419572192,419795200,420018080,420240864,420463552,
420686144,420908608,421130976,421353280,421575424,421797504,422019488,422241344,
422463104,422684768,422906336,423127776,423349120,423570400,423791520,424012576,
424233536,424454368,424675104,424895744,425116288,425336736,425557056,425777280,
425997408,426217440,426437376,426657184,426876928,427096544,427316064,427535488,
427754784,427974016,428193120,428412128,428631040,428849856,429068544,429287168,
429505664,429724064,429942368,430160576,430378656,430596672,430814560,431032352,
431250048,431467616,431685120,431902496,432119808,432336992,432554080,432771040,
432987936,433204736,433421408,433637984,433854464,434070848,434287104,434503296,
434719360,434935360,435151232,435367008,435582656,435798240,436013696,436229088,
436444352,436659520,436874592,437089568,437304416,437519200,437733856,437948416,
438162880,438377248,438591520,438805696,439019744,439233728,439447584,439661344,
439875008,440088576,440302048,440515392,440728672,440941824,441154880,441367872,
441580736,441793472,442006144,442218720,442431168,442643552,442855808,443067968,
443280032,443492000,443703872,443915648,444127296,444338880,444550336,444761696,
444972992,445184160,445395232,445606176,445817056,446027840,446238496,446449088,
446659552,446869920,447080192,447290400,447500448,447710432,447920320,448130112,
448339776,448549376,448758848,448968224,449177536,449386720,449595808,449804800,
450013664,450222464,450431168,450639776,450848256,451056640,451264960,451473152,
451681248,451889248,452097152,452304960,452512672,452720288,452927808,453135232,
453342528,453549760,453756864,453963904,454170816,454377632,454584384,454791008,
454997536,455203968,455410304,455616544,455822688,456028704,456234656,456440512,
456646240,456851904,457057472,457262912,457468256,457673536,457878688,458083744,
458288736,458493600,458698368,458903040,459107616,459312096,459516480,459720768,
459924960,460129056,460333056,460536960,460740736,460944448,461148064,461351584,
461554976,461758304,461961536,462164640,462367680,462570592,462773440,462976160,
463178816,463381344,463583776,463786144,463988384,464190560,464392608,464594560,
464796448,464998208,465199872,465401472,465602944,465804320,466005600,466206816,
466407904,466608896,466809824,467010624,467211328,467411936,467612480,467812896,
468013216,468213440,468413600,468613632,468813568,469013440,469213184,469412832,
469612416,469811872,470011232,470210528,470409696,470608800,470807776,471006688,
471205472,471404192,471602784,471801312,471999712,472198048,472396288,472594400,
472792448,472990400,473188256,473385984,473583648,473781216,473978688,474176064,
474373344,474570528,474767616,474964608,475161504,475358336,475555040,475751648,
475948192,476144608,476340928,476537184,476733312,476929376,477125344,477321184,
477516960,477712640,477908224,478103712,478299104,478494400,478689600,478884704,
479079744,479274656,479469504,479664224,479858880,480053408,480247872,480442240,
480636512,480830656,481024736,481218752,481412640,481606432,481800128,481993760,
482187264,482380704,482574016,482767264,482960416,483153472,483346432,483539296,
483732064,483924768,484117344,484309856,484502240,484694560,484886784,485078912,
485270944,485462880,485654720,485846464,486038144,486229696,486421184,486612576,
486803840,486995040,487186176,487377184,487568096,487758912,487949664,488140320,
488330880,488521312,488711712,488901984,489092160,489282240,489472256,489662176,
489851968,490041696,490231328,490420896,490610336,490799712,490988960,491178144,
491367232,491556224,491745120,491933920,492122656,492311264,492499808,492688256,
492876608,493064864,493253056,493441120,493629120,493817024,494004832,494192544,
494380160,494567712,494755136,494942496,495129760,495316928,495504000,495691008,
495877888,496064704,496251424,496438048,496624608,496811040,496997408,497183680,
497369856,497555936,497741920,497927840,498113632,498299360,498484992,498670560,
498856000,499041376,499226656,499411840,499596928,499781920,499966848,500151680,
500336416,500521056,500705600,500890080,501074464,501258752,501442944,501627040,
501811072,501995008,502178848,502362592,502546240,502729824,502913312,503096704,
503280000,503463232,503646368,503829408,504012352,504195200,504377984,504560672,
504743264,504925760,505108192,505290496,505472736,505654912,505836960,506018944,
506200832,506382624,506564320,506745952,506927488,507108928,507290272,507471552,
507652736,507833824,508014816,508195744,508376576,508557312,508737952,508918528,
509099008,509279392,509459680,509639904,509820032,510000064,510180000,510359872,
510539648,510719328,510898944,511078432,511257856,511437216,511616448,511795616,
511974688,512153664,512332576,512511392,512690112,512868768,513047296,513225792,
513404160,513582432,513760640,513938784,514116800,514294752,514472608,514650368,
514828064,515005664,515183168,515360608,515537952,515715200,515892352,516069440,
516246432,516423328,516600160,516776896,516953536,517130112,517306592,517482976,
517659264,517835488,518011616,518187680,518363648,518539520,518715296,518891008,
519066624,519242144,519417600,519592960,519768256,519943424,520118528,520293568,
520468480,520643328,520818112,520992800,521167392,521341888,521516320,521690656,
521864896,522039072,522213152,522387168,522561056,522734912,522908640,523082304,
523255872,523429376,523602784,523776096,523949312,524122464,524295552,524468512,
524641440,524814240,524986976,525159616,525332192,525504640,525677056,525849344,
526021568,526193728,526365792,526537760,526709632,526881440,527053152,527224800,
527396352,527567840,527739200,527910528,528081728,528252864,528423936,528594880,
528765760,528936576,529107296,529277920,529448480,529618944,529789344,529959648,
530129856,530300000,530470048,530640000,530809888,530979712,531149440,531319072,
531488608,531658080,531827488,531996800,532166016,532335168,532504224,532673184,
532842080,533010912,533179616,533348288,533516832,533685312,533853728,534022048,
534190272,534358432,534526496,534694496,534862400,535030240,535197984,535365632,
535533216,535700704,535868128,536035456,536202720,536369888,536536992,536704000,
536870912
};
#endif
#ifdef TABLES_AS_LUMPS
#include "m_swap.h"
// R_LoadTrigTables
// Load trig tables from a wad file lump
// CPhipps 24/12/98 - fix endianness (!)
// KKurbjun 3/09/2006 - Modified to reduce initial footprint
//
void R_LoadTrigTables(void)
{
finesine=malloc(10240*sizeof(fixed_t));
finetangent=malloc(4096*sizeof(fixed_t));
tantoangle=malloc(2049*sizeof(angle_t));
finecosine=finesine + FINEANGLES/4;
int lump;
{
lump = W_GetNumForName("SINETABL");
if (W_LumpLength(lump) != 10240*sizeof(fixed_t))
I_Error("R_LoadTrigTables: Invalid SINETABL");
W_ReadLump(lump,(unsigned char*)finesine);
}
{
lump = W_GetNumForName("TANGTABL");
if (W_LumpLength(lump) != 4096*sizeof(fixed_t))
I_Error("R_LoadTrigTables: Invalid TANGTABL");
W_ReadLump(lump,(unsigned char*)finetangent);
}
{
lump = W_GetNumForName("TANTOANG");
if (W_LumpLength(lump) != 2049*sizeof(fixed_t))
I_Error("R_LoadTrigTables: Invalid TANTOANG");
W_ReadLump(lump,(unsigned char*)tantoangle);
}
// Endianness correction - might still be non-portable, but is fast where possible
{
size_t n;
printf("Endianness...");
// This test doesn't assume the endianness of the tables, but deduces them from
// en entry. I hope this is portable.
if ((10 < finesine[1]) && (finesine[1] < 100)) {
printf("ok.");
return; // Endianness is correct
}
// Must correct endianness of every long loaded (!)
#define CORRECT_TABLE_ENDIAN(tbl, size) \
for (n = 0; n<size; n++) tbl[n] = doom_swap_l(tbl[n])
CORRECT_TABLE_ENDIAN(finesine, 10240);
CORRECT_TABLE_ENDIAN(finetangent, 4096);
CORRECT_TABLE_ENDIAN(tantoangle, 2049);
printf("corrected.");
}
}
#endif