comparison engine/core/video/opengl/glimage.cpp @ 603:739d8a43d771

* Fixed a bug in glimage.cpp. Now scale_x and scale_y is used. * Fixed a bug in sdlimage.cpp. Removed a SDL_SetAlpha() call, which had triggered a segfault. * Added Zoom support to SDL.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 08 Sep 2010 13:47:16 +0000
parents 47b49b9b0c0a
children 853d25234671
comparison
equal deleted inserted replaced
602:2032ec27b851 603:739d8a43d771
107 107
108 glEnable(GL_TEXTURE_2D); 108 glEnable(GL_TEXTURE_2D);
109 for (unsigned int i = 0; i < m_cols; ++i) { 109 for (unsigned int i = 0; i < m_cols; ++i) {
110 if (i == m_cols-1) { 110 if (i == m_cols-1) {
111 col_fill_ratio = m_last_col_fill_ratio; 111 col_fill_ratio = m_last_col_fill_ratio;
112 target.w = static_cast<int>(round(scale_y*m_last_col_width*m_last_col_fill_ratio)); 112 target.w = static_cast<int>(round(scale_x*m_last_col_width*m_last_col_fill_ratio));
113 } else { 113 } else {
114 col_fill_ratio = 1.0; 114 col_fill_ratio = 1.0;
115 target.w = static_cast<int>(round(scale_y*m_chunk_size)); 115 target.w = static_cast<int>(round(scale_x*m_chunk_size));
116 } 116 }
117 if (i > 0) { 117 if (i > 0) {
118 target.x = prev.x + prev.w; 118 target.x = prev.x + prev.w;
119 } else { 119 } else {
120 target.x = rect.x; 120 target.x = rect.x;