ソースを参照

build: various Windows compilation fixes.

undefined
Sam Hocevar 10年前
コミット
b369be3dd7
5個のファイルの変更41行の追加11行の削除
  1. +1
    -1
      src/image/image.cpp
  2. +6
    -6
      src/image/render/screen.cpp
  3. +2
    -2
      src/lol/image/image.h
  4. +7
    -1
      src/lolcore.vcxproj
  5. +25
    -1
      src/lolcore.vcxproj.filters

+ 1
- 1
src/image/image.cpp ファイルの表示

@@ -208,7 +208,7 @@ _T(PixelFormat::RGBA_F32);
#undef _T

/* Special case for the "any" format: return the last active buffer */
template<> void *Image::Lock<PixelFormat::Unknown>()
void *Image::Lock()
{
ASSERT(m_data->m_format != PixelFormat::Unknown);



+ 6
- 6
src/image/render/screen.cpp ファイルの表示

@@ -59,7 +59,7 @@ bool Image::RenderBayer(ivec2 size)
typedef struct
{
int x, y;
double dist;
float dist;
}
dot_t;

@@ -78,10 +78,10 @@ bool Image::RenderHalftone(ivec2 size)
for (int y = 0; y < size.y; y++)
for (int x = 0; x < size.x; x++)
{
double dy = ((double)y + .07) / size.y - .5;
double dx = (double)x / size.x - .5;
float dy = ((float)y + 0.07f) / size.y - 0.5f;
float dx = (float)x / size.x - 0.5f;
/* Using dx²+dy² here creates another interesting halftone. */
double r = - cos(M_PI * (dx - dy)) - cos(M_PI * (dx + dy));
float r = - lol::cos(F_PI * (dx - dy)) - lol::cos(F_PI * (dx + dy));
circle[y * size.x + x].x = x;
circle[y * size.x + x].y = y;
circle[y * size.x + x].dist = r;
@@ -98,8 +98,8 @@ bool Image::RenderHalftone(ivec2 size)

pixels[y * (2 * size.x) + x] = (float)(2 * n + 1) * mul;
pixels[(y + size.y) * (2 * size.x) + x + size.x] = (float)(2 * n + 2) * mul;
pixels[(y + size.y) * (2 * size.x) + x] = 1. - (float)(2 * n + 1) * mul;
pixels[y * (2 * size.x) + x + size.x] = 1. - (float)(2 * n + 2) * mul;
pixels[(y + size.y) * (2 * size.x) + x] = 1.0f - (float)(2 * n + 1) * mul;
pixels[y * (2 * size.x) + x + size.x] = 1.0f - (float)(2 * n + 2) * mul;
}
Unlock(pixels);



+ 2
- 2
src/lol/image/image.h ファイルの表示

@@ -69,8 +69,8 @@ public:
WrapMode GetWrapY() const;
void SetWrap(WrapMode wrap_x, WrapMode wrap_y);

template<PixelFormat T = PixelFormat::Unknown>
typename PixelType<T>::type *Lock();
template<PixelFormat T> typename PixelType<T>::type *Lock();
void *Lock();
void Unlock(void const *pixels);

bool RetrieveTiles(Array<ivec2, ivec2>& tiles) const;


+ 7
- 1
src/lolcore.vcxproj ファイルの表示

@@ -149,7 +149,13 @@
<ClCompile Include="image\codec\zed-palette-image.cpp" />
<ClCompile Include="image\color\cie1931.cpp" />
<ClCompile Include="image\color\color.cpp" />
<ClCompile Include="image\dither\ediff.cpp" />
<ClCompile Include="image\dither\ostromoukhov.cpp" />
<ClCompile Include="image\dither\random.cpp" />
<ClCompile Include="image\image.cpp" />
<ClCompile Include="image\pixels.cpp" />
<ClCompile Include="image\render\noise.cpp" />
<ClCompile Include="image\render\screen.cpp" />
<ClCompile Include="input\controller.cpp" />
<ClCompile Include="input\input.cpp" />
<ClCompile Include="layer.cpp" />
@@ -431,4 +437,4 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\Lol.Fx.targets" />
</ImportGroup>
</Project>
</Project>

+ 25
- 1
src/lolcore.vcxproj.filters ファイルの表示

@@ -85,6 +85,12 @@
<Filter Include="platform\nacl">
<UniqueIdentifier>{f6cc3470-c841-4581-969b-e60cea841c27}</UniqueIdentifier>
</Filter>
<Filter Include="image\dither">
<UniqueIdentifier>{63e63eea-c96e-4d37-81f6-f3f17e18b751}</UniqueIdentifier>
</Filter>
<Filter Include="image\render">
<UniqueIdentifier>{23655fca-56e5-48ec-8cf0-a71322f4cc89}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="image\image.cpp">
@@ -355,6 +361,24 @@
<ClCompile Include="sys\thread.cpp">
<Filter>sys</Filter>
</ClCompile>
<ClCompile Include="image\dither\ediff.cpp">
<Filter>image\dither</Filter>
</ClCompile>
<ClCompile Include="image\dither\ostromoukhov.cpp">
<Filter>image\dither</Filter>
</ClCompile>
<ClCompile Include="image\dither\random.cpp">
<Filter>image\dither</Filter>
</ClCompile>
<ClCompile Include="image\render\noise.cpp">
<Filter>image\render</Filter>
</ClCompile>
<ClCompile Include="image\render\screen.cpp">
<Filter>image\render</Filter>
</ClCompile>
<ClCompile Include="image\pixels.cpp">
<Filter>image</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="debug\fps.h">
@@ -760,4 +784,4 @@
</None>
<None Include="Makefile.am" />
</ItemGroup>
</Project>
</Project>

読み込み中…
キャンセル
保存