Bladeren bron

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 jaren geleden
bovenliggende
commit
47b9f0abb0
7 gewijzigde bestanden met toevoegingen van 35 en 35 verwijderingen
  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 Bestand weergeven

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

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

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

//GETTER


+ 4
- 4
src/easymesh/easymesh.cpp Bestand weergeven

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


+ 20
- 20
src/easymesh/easymeshbuild.cpp Bestand weergeven

@@ -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.
void VertexDictionnary::RemoveVertex(const int vert_id)
{
int j = 0;
int j = 0;
for (; j < vertex_list.Count(); j++)
if (vertex_list[j].m1 == vert_id)
break;

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


+ 1
- 1
src/easymesh/easymeshbuild.h Bestand weergeven

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


+ 5
- 5
src/easymesh/easymeshrender.cpp Bestand weergeven

@@ -239,11 +239,11 @@ void GpuEasyMeshData::AddGpuData(GpuShaderData* gpudata, EasyMesh* src_mesh)
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)
{
int i = m_gpudatas.Count();
int max = gpudata->m_render_mode + 1;
int i = m_gpudatas.Count();
int max = gpudata->m_render_mode + 1;
m_gpudatas.Reserve(max);
for (; i < max; i++)
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)
{
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(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");
GpuShaderData& gpu_sd = *(m_gpudatas[render_mode]);

int vdecl_idx = 0;


+ 2
- 2
src/easymesh/easymeshrender.h Bestand weergeven

@@ -90,7 +90,7 @@ public:
protected:
uint16_t m_vert_decl_flags;
Shader* m_shader;
int m_render_mode;
int m_render_mode;
Array<lol::String, ShaderUniform> m_shader_uniform;
Array<ShaderAttrib> m_shader_attrib;
};
@@ -121,7 +121,7 @@ public:
//---
void AddGpuData(GpuShaderData* gpudata, class EasyMesh* src_mesh);
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:
void SetupVertexData(uint16_t vdecl_flags, EasyMesh* src_mesh);


+ 1
- 1
src/platform/android/androidapp.cpp Bestand weergeven

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

if (ident >= 0 && source)


Laden…
Annuleren
Opslaan