00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #include <stdincl.h> 00024 00025 #include "client.h" 00026 #include "Main.h" 00027 #include "AnimateThread.h" 00028 00029 00030 AnimateThread::AnimateThread() : Thread(false) 00031 //,m_sdl(sdl) 00032 //,m_fCourier8("COURI.TTF",8) 00033 { 00034 DEB(printf("AnimateThread()\n");) 00035 } 00036 00037 00038 AnimateThread::~AnimateThread() 00039 { 00040 DEB(printf("~AnimateThread()\n");) 00041 } 00042 00043 00044 /* 00045 sge truetype text output 00046 00047 DECLSPEC SDL_Rect 00048 sge_tt_textout (SDL_Surface *Surface, sge_TTFont *font, const char *string, 00049 Sint16 x, Sint16 y, 00050 Uint32 fcolor, 00051 Uint32 bcolor, int Alpha); 00052 sge_tt_textout_UTF8(SDL_Surface *Surface, sge_TTFont *font, const char *string, 00053 Sint16 x, Sint16 y, 00054 Uint32 fcolor, 00055 Uint32 bcolor, int Alpha); 00056 sge_tt_textout_UNI (SDL_Surface *Surface, sge_TTFont *font, const Uint16 *uni, 00057 Sint16 x, Sint16 y, 00058 Uint32 fcolor, 00059 Uint32 bcolor, int Alpha); 00060 sge_tt_textoutf (SDL_Surface *Surface, sge_TTFont *font, 00061 Sint16 x, Sint16 y, 00062 Uint8 fR, Uint8 fG, Uint8 fB, 00063 Uint8 bR, Uint8 bG, Uint8 bB, int Alpha ,char *format,...); 00064 sge_tt_textout (SDL_Surface *Surface, sge_TTFont *font, const char *string, 00065 Sint16 x, Sint16 y, 00066 Uint8 fR, Uint8 fG, Uint8 fB, 00067 Uint8 bR, Uint8 bG, Uint8 bB, int Alpha); 00068 sge_tt_textout_UTF8(SDL_Surface *Surface, sge_TTFont *font, const char *string, 00069 Sint16 x, Sint16 y, 00070 Uint8 fR, Uint8 fG, Uint8 fB, 00071 Uint8 bR, Uint8 bG, Uint8 bB, int Alpha); 00072 sge_tt_textout_UNI (SDL_Surface *Surface, sge_TTFont *font, const Uint16 *uni, 00073 Sint16 x, Sint16 y, 00074 Uint8 fR, Uint8 fG, Uint8 fB, 00075 Uint8 bR, Uint8 bG, Uint8 bB, int Alpha); 00076 */ 00077 00078 void AnimateThread::Run() 00079 { 00080 /* 00081 sge_tt_textoutf(m_sdl->GetScreen(), m_fCourier8.GetFont(), 00082 100,100, 00083 255,128,128, 00084 0,0,0, 00085 SDL_ALPHA_OPAQUE, 00086 "Hello World?"); 00087 */ 00088 while (IsRunning()) 00089 { 00090 SDL_Delay(1000); 00091 #ifndef WIN32 00092 SDL_Event e; 00093 e.type = SDL_USEREVENT; 00094 e.user.code = SDL_USEREVENT_TIMER; 00095 e.user.data1 = NULL; 00096 e.user.data2 = NULL; 00097 // SDL_PushEvent(&e); 00098 #endif 00099 // DEB(printf("SDL ticks: %d\n",SDL_GetTicks() );) 00100 // SetRunning(false); 00101 // m_sdl -> DrawBox(320, 240); 00102 } // while (IsRunning()) 00103 00104 SetRunning(false); //m_running = 0; // if break 00105 } 00106