Przeglądaj źródła

fixed 69 files out of 2739:

- removed 10 CR characters
 - removed 39 trailing whitespaces
 - replaced 243 tabs with spaces
 - fixed 60 svn:eol-style properties
undefined
Lolbot Sam Hocevar <sam@hocevar.net> 11 lat temu
rodzic
commit
47b9f0abb0
7 zmienionych plików z 35 dodań i 35 usunięć
  1. +2
    -2
      src/commandstack.h
  2. +4
    -4
      src/easymesh/easymesh.cpp
  3. +20
    -20
      src/easymesh/easymeshbuild.cpp
  4. +1
    -1
      src/easymesh/easymeshbuild.h
  5. +5
    -5
      src/easymesh/easymeshrender.cpp
  6. +2
    -2
      src/easymesh/easymeshrender.h
  7. +1
    -1
      src/platform/android/androidapp.cpp

+ 2
- 2
src/commandstack.h Wyświetl plik

@@ -31,7 +31,7 @@ private:
int m_i_cur; int m_i_cur;


public: public:
//GET/SET exec //GET/SET exec
int GetCmdNb() { return m_commands.Count(); } int GetCmdNb() { return m_commands.Count(); }
int GetCmd(int i) int GetCmd(int i)
{ {
@@ -41,7 +41,7 @@ public:
return m_commands[i].m1; return m_commands[i].m1;
} }


//cmd storage //cmd storage
void AddCmd(int cmd) { m_commands.Push(cmd, m_floats.Count(), m_ints.Count()); } void AddCmd(int cmd) { m_commands.Push(cmd, m_floats.Count(), m_ints.Count()); }


//GETTER //GETTER


+ 4
- 4
src/easymesh/easymesh.cpp Wyświetl plik

@@ -41,8 +41,8 @@ EasyMesh::EasyMesh(const EasyMesh& em)
m_cursors = em.m_cursors; m_cursors = em.m_cursors;
m_build_data = nullptr; m_build_data = nullptr;
m_gpu_data = GpuEasyMeshData(); m_gpu_data = GpuEasyMeshData();
if (em.m_build_data) if (em.m_build_data)
m_build_data = new EasyMeshBuildData(*em.m_build_data); m_build_data = new EasyMeshBuildData(*em.m_build_data);
if (m_indices.Count() && m_vert.Count() && m_cursors.Count()) if (m_indices.Count() && m_vert.Count() && m_cursors.Count())
m_state = MeshRender::NeedConvert; m_state = MeshRender::NeedConvert;
else else
@@ -238,8 +238,8 @@ void EasyMesh::MeshConvert(GpuShaderData* new_gpu_sdata)
{ {
m_gpu_data.AddGpuData(new_gpu_sdata, this); m_gpu_data.AddGpuData(new_gpu_sdata, this);
for (int i = DebugRenderMode::Default; i < DebugRenderMode::Max; i++) for (int i = DebugRenderMode::Default; i < DebugRenderMode::Max; i++)
if (!m_gpu_data.HasData(i)) if (!m_gpu_data.HasData(i))
m_gpu_data.AddGpuData(new DefaultShaderData(DebugRenderMode(i)), this); m_gpu_data.AddGpuData(new DefaultShaderData(DebugRenderMode(i)), this);
} }
m_state = MeshRender::CanRender; m_state = MeshRender::CanRender;
} }


+ 20
- 20
src/easymesh/easymeshbuild.cpp Wyświetl plik

@@ -184,30 +184,30 @@ void VertexDictionnary::AddVertex(const int vert_id, const vec3 vert_coord)
//Will update the given list with all the vertices on the same spot. //Will update the given list with all the vertices on the same spot.
void VertexDictionnary::RemoveVertex(const int vert_id) void VertexDictionnary::RemoveVertex(const int vert_id)
{ {
int j = 0; int j = 0;
for (; j < vertex_list.Count(); j++) for (; j < vertex_list.Count(); j++)
if (vertex_list[j].m1 == vert_id) if (vertex_list[j].m1 == vert_id)
break; break;


if (vertex_list[j].m3 == VDictType::Master) if (vertex_list[j].m3 == VDictType::Master)
{ {
int jf = -1; int jf = -1;
//change all the master ref in the list //change all the master ref in the list
for (int i = 0; i < vertex_list.Count(); i++) for (int i = 0; i < vertex_list.Count(); i++)
{ {
if (vertex_list[i].m3 == j) if (vertex_list[i].m3 == j)
{ {
if (jf < 0) if (jf < 0)
{ {
jf = i; jf = i;
vertex_list[i].m3 = VDictType::Master; vertex_list[i].m3 = VDictType::Master;
} }
else else
vertex_list[i].m3 = jf; vertex_list[i].m3 = jf;
} }
} }
} }
vertex_list.Remove(j); vertex_list.Remove(j);
for (int i = 0; i < master_list.Count(); i++) for (int i = 0; i < master_list.Count(); i++)
if (master_list[j] == j) if (master_list[j] == j)
break; break;


+ 1
- 1
src/easymesh/easymeshbuild.h Wyświetl plik

@@ -196,7 +196,7 @@ public:
m_texcoord_scale = vec2(1.f); m_texcoord_scale = vec2(1.f);
m_texcoord_scale2 = vec2(1.f); m_texcoord_scale2 = vec2(1.f);
m_build_flags = 0; m_build_flags = 0;
m_i_cmd = 0; m_i_cmd = 0;
m_exec_nb = -1; m_exec_nb = -1;
for (int i = 0; i < MeshType::Max; ++i) for (int i = 0; i < MeshType::Max; ++i)
{ {


+ 5
- 5
src/easymesh/easymeshrender.cpp Wyświetl plik

@@ -239,11 +239,11 @@ void GpuEasyMeshData::AddGpuData(GpuShaderData* gpudata, EasyMesh* src_mesh)
m_indexcount = indexlist.Count(); m_indexcount = indexlist.Count();
} }


//init to a minimum of gpudata->m_render_mode size //init to a minimum of gpudata->m_render_mode size
if (m_gpudatas.Count() <= gpudata->m_render_mode) if (m_gpudatas.Count() <= gpudata->m_render_mode)
{ {
int i = m_gpudatas.Count(); int i = m_gpudatas.Count();
int max = gpudata->m_render_mode + 1; int max = gpudata->m_render_mode + 1;
m_gpudatas.Reserve(max); m_gpudatas.Reserve(max);
for (; i < max; i++) for (; i < max; i++)
m_gpudatas << nullptr; m_gpudatas << nullptr;
@@ -378,8 +378,8 @@ void GpuEasyMeshData::SetupVertexData(uint16_t vflags, EasyMesh* src_mesh)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void GpuEasyMeshData::RenderMeshData(mat4 const &model, int render_mode) void GpuEasyMeshData::RenderMeshData(mat4 const &model, int render_mode)
{ {
ASSERT(0 <= render_mode && render_mode < m_gpudatas.Count(), "render mode is not in the defined range"); ASSERT(0 <= render_mode && render_mode < m_gpudatas.Count(), "render mode is not in the defined range");
ASSERT(m_gpudatas[render_mode], "gpu datas for this render mode don't exist"); ASSERT(m_gpudatas[render_mode], "gpu datas for this render mode don't exist");
GpuShaderData& gpu_sd = *(m_gpudatas[render_mode]); GpuShaderData& gpu_sd = *(m_gpudatas[render_mode]);


int vdecl_idx = 0; int vdecl_idx = 0;


+ 2
- 2
src/easymesh/easymeshrender.h Wyświetl plik

@@ -90,7 +90,7 @@ public:
protected: protected:
uint16_t m_vert_decl_flags; uint16_t m_vert_decl_flags;
Shader* m_shader; Shader* m_shader;
int m_render_mode; int m_render_mode;
Array<lol::String, ShaderUniform> m_shader_uniform; Array<lol::String, ShaderUniform> m_shader_uniform;
Array<ShaderAttrib> m_shader_attrib; Array<ShaderAttrib> m_shader_attrib;
}; };
@@ -121,7 +121,7 @@ public:
//--- //---
void AddGpuData(GpuShaderData* gpudata, class EasyMesh* src_mesh); void AddGpuData(GpuShaderData* gpudata, class EasyMesh* src_mesh);
void RenderMeshData(mat4 const &model, int render_mode=Video::GetDebugRenderMode()); void RenderMeshData(mat4 const &model, int render_mode=Video::GetDebugRenderMode());
bool HasData(int render_mode) { return (0 <= render_mode && render_mode < m_gpudatas.Count() && !!m_gpudatas[render_mode]); } bool HasData(int render_mode) { return (0 <= render_mode && render_mode < m_gpudatas.Count() && !!m_gpudatas[render_mode]); }


private: private:
void SetupVertexData(uint16_t vdecl_flags, EasyMesh* src_mesh); void SetupVertexData(uint16_t vdecl_flags, EasyMesh* src_mesh);


+ 1
- 1
src/platform/android/androidapp.cpp Wyświetl plik

@@ -323,7 +323,7 @@ void android_main(android_app* native_app)
{ {
int ident, fdesc, events; int ident, fdesc, events;
struct android_poll_source* source; struct android_poll_source* source;
ident = ALooper_pollAll(0, &fdesc, &events, (void**)&source); ident = ALooper_pollAll(0, &fdesc, &events, (void**)&source);


if (ident >= 0 && source) if (ident >= 0 && source)


||||||
x
 
000:0
Ładowanie…
Anuluj
Zapisz