• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Commit MetaInfo

Révisione3998d07e6586e4dbc492117d44a41b2411e9a7f (tree)
l'heure2012-11-18 23:54:38
Auteurshom5xg <shom@.(no...>
Commitershom5xg

Message de Log

remove parameter calling as global variables

Change Summary

Modification

--- a/core/src/core/graphic/2d/board.cpp
+++ b/core/src/core/graphic/2d/board.cpp
@@ -94,11 +94,11 @@ cboard::~cboard()
9494 release_all();
9595 }
9696
97-b32 cboard::Initialize( crender* in_p_render )
97+b32 cboard::Initialize()
9898 {
9999 #ifdef DX
100100 ///--
101- LPDIRECT3DDEVICE9 p_device = in_p_render->GetDevice();
101+ LPDIRECT3DDEVICE9 p_device = g_p_render->GetDevice();
102102
103103 const HRESULT hr =
104104 p_device->CreateVertexBuffer(
@@ -215,19 +215,19 @@ void cboard::update_vertex()
215215 {
216216 static f32 convert_pos_x( f32 pos_x )
217217 {
218- const u32 client_width = window::GetClientWidth();
218+ const u32 sc_uClientWidth = window::GetClientWidth();
219219
220220 const f32 pos_x_on_ratio_of_screen =
221- pos_x / SCAST<f32>( client_width );
221+ pos_x / SCAST<f32>( sc_uClientWidth );
222222 return ( pos_x_on_ratio_of_screen * 2.0f - 1.0f );
223223 }
224224
225225 static f32 convert_pos_y( f32 pos_y )
226226 {
227- const u32 client_height = window::GetClientHeight();
227+ const u32 sc_uClientHeight = window::GetClientHeight();
228228
229229 const f32 pos_y_on_ratio_of_screen =
230- 1.0f - pos_y / SCAST<f32>( client_height );
230+ 1.0f - pos_y / SCAST<f32>( sc_uClientHeight );
231231 return ( pos_y_on_ratio_of_screen * 2.0f - 1.0f );
232232 }
233233 };
@@ -273,10 +273,10 @@ void cboard::update_vertex()
273273 #endif
274274 }
275275
276-void cboard::Draw( crender* in_p_render )
276+void cboard::Draw()
277277 {
278278 #ifdef DX
279- LPDIRECT3DDEVICE9 p_device = in_p_render->GetDevice();
279+ LPDIRECT3DDEVICE9 p_device = g_p_render->GetDevice();
280280
281281 p_device->SetStreamSource( 0, m_p_buf_vertex, 0, sizeof( board_vertex_t ) );
282282 p_device->SetFVF( MY_FVF_BOARD );
--- a/core/src/core/graphic/2d/board.h
+++ b/core/src/core/graphic/2d/board.h
@@ -21,7 +21,7 @@ public:
2121 cboard();
2222 virtual ~cboard();
2323
24- virtual b32 Initialize( crender* in_p_render );
24+ virtual b32 Initialize();
2525 virtual void Finalize();
2626
2727 virtual void Update( b32 b_force = FALSE );
@@ -29,7 +29,7 @@ private: //-- inner function
2929 void update_fade();
3030 void update_vertex();
3131 public: //--
32- virtual void Draw( crender* in_p_render );
32+ virtual void Draw();
3333
3434 virtual void SetPos( const vec3f& in_v3_pos );
3535 virtual void SetPos( const vec2f& in_v2_pos );
--- a/core/src/core/graphic/2d/image_board.cpp
+++ b/core/src/core/graphic/2d/image_board.cpp
@@ -56,22 +56,21 @@ void cimage_board::release_all()
5656 #endif
5757 }
5858
59-b32 cimage_board::Initialize( crender* in_p_render )
59+b32 cimage_board::Initialize()
6060 {
61- return ( cboard::Initialize( in_p_render ) );
61+ return ( cboard::Initialize() );
6262 }
6363
6464 b32 cimage_board::Initialize(
65- crender* in_p_render,
6665 const TCHAR* const sz_path_texture,
6766 f32 width, f32 height
6867 )
6968 {
70- const b32 b_success = Initialize( in_p_render );
69+ const b32 b_success = Initialize();
7170
7271 if( b_success )
7372 {
74- const u32 idx = CreateTexture( in_p_render, sz_path_texture, width, height );
73+ const u32 idx = CreateTexture( sz_path_texture, width, height );
7574 SetTextureActive( idx );
7675 }
7776
@@ -83,14 +82,14 @@ void cimage_board::Finalize()
8382 cboard::Finalize();
8483 }
8584
86-void cimage_board::Draw( crender* in_p_render )
85+void cimage_board::Draw()
8786 {
8887 #ifdef DX
8988 ///--
9089 if( m_idx_texture_active != U32_INVALID )
9190 {
9291 ///-- reset info and setting
93- LPDIRECT3DDEVICE9 p_device = in_p_render->GetDevice();
92+ LPDIRECT3DDEVICE9 p_device = g_p_render->GetDevice();
9493
9594 //--
9695 ASSERT( m_p_texture_list[ m_idx_texture_active ] );
@@ -123,7 +122,7 @@ void cimage_board::Draw( crender* in_p_render )
123122 ///--
124123
125124 ///-- draw
126- cboard::Draw( in_p_render );
125+ cboard::Draw();
127126 ///--
128127 #else
129128 glBindTexture( GL_TEXTURE_2D, m_idx_texture_active );
@@ -162,7 +161,6 @@ void cimage_board::Draw( crender* in_p_render )
162161 }
163162
164163 u32 cimage_board::CreateTexture(
165- crender* in_p_render,
166164 const TCHAR* const sz_path_texture,
167165 f32 width, f32 height
168166 )
@@ -178,7 +176,7 @@ u32 cimage_board::CreateTexture(
178176 ///--
179177 LPDIRECT3DTEXTURE9 p_texture_create;
180178 D3DXCreateTextureFromFileEx(
181- in_p_render->GetDevice(),
179+ g_p_render->GetDevice(),
182180 sz_path_texture,
183181 #if 1
184182 D3DX_DEFAULT/*get from texture*/, //Width
--- a/core/src/core/graphic/2d/image_board.h
+++ b/core/src/core/graphic/2d/image_board.h
@@ -28,18 +28,16 @@ private: //-- inner function
2828 void release_all();
2929 public: //--
3030
31- virtual b32 Initialize( crender* in_p_render );
31+ virtual b32 Initialize();
3232 virtual b32 Initialize(
33- crender* in_p_render,
3433 const TCHAR* const sz_path_texture,
3534 f32 width = F32_INVALID, f32 height = F32_INVALID
3635 );
3736 virtual void Finalize();
3837
39- virtual void Draw( crender* in_p_render );
38+ virtual void Draw();
4039
4140 u32 CreateTexture(
42- crender* in_p_render,
4341 const TCHAR* const sz_path_texture,
4442 f32 width = F32_INVALID, f32 height = F32_INVALID
4543 );