Skip to content

Commit 92216bf

Browse files
committed
changed encoding (sjis -> UTF8 BOM)
1 parent f51709d commit 92216bf

File tree

12 files changed

+33
-33
lines changed

12 files changed

+33
-33
lines changed

FrameCapturer/Assets/FrameCapturer/Scripts/FrameCapturer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections;
33
using System.Runtime.InteropServices;
44
using System.Runtime.CompilerServices;

Plugin/FrameCapturer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "FrameCapturer.h"
33

Plugin/FrameCapturer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifndef FrameCapturer_h
1+
#ifndef FrameCapturer_h
22
#define FrameCapturer_h
33

44
class fcExrContext;

Plugin/fcExrFile.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "FrameCapturer.h"
33
#include "fcThreadPool.h"
44
#include "fcGraphicsDevice.h"
@@ -141,10 +141,10 @@ bool fcExrContext::writeFrame(const char *path_, void *tex, int width, int heigh
141141
{
142142
WorkData *wd = nullptr;
143143

144-
// フレームバッファの内容取得
144+
// フレームバッファの内容取得
145145
if (tex == nullptr)
146146
{
147-
// tex が null の場合、前回取得した結果を使い回す。 (exr 書き出しの場合わりとよくあるケース)
147+
// tex が null の場合、前回取得した結果を使い回す。 (exr 書き出しの場合わりとよくあるケース)
148148
wd = &m_raw_frames[(m_frame - 1) % m_conf.max_active_tasks];
149149
}
150150
else
@@ -163,7 +163,7 @@ bool fcExrContext::writeFrame(const char *path_, void *tex, int width, int heigh
163163
++m_frame;
164164
}
165165

166-
// exr 書き出しタスクを kick
166+
// exr 書き出しタスクを kick
167167
std::string path = path_;
168168
++wd->refcount;
169169
m_tasks.run([this, path, wd, width, height, fmt, mask](){

Plugin/fcGifFile.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "FrameCapturer.h"
33
#include "fcThreadPool.h"
44
#include "fcGraphicsDevice.h"
@@ -61,7 +61,7 @@ fcGifContext::~fcGifContext()
6161

6262
static inline void advance_palette_and_pop_front(std::list<jo_gif_frame_t>& frames)
6363
{
64-
// 先頭のパレットをいっこ先のフレームへ移動
64+
// 先頭のパレットをいっこ先のフレームへ移動
6565
if (frames.size() >= 2)
6666
{
6767
auto &first = frames.front();
@@ -75,13 +75,13 @@ static inline void advance_palette_and_pop_front(std::list<jo_gif_frame_t>& fram
7575

7676
void fcGifContext::scrape(bool updating)
7777
{
78-
// 最大容量か最大フレーム数が設定されている場合、それらを超過したフレームをここで切り捨てる。
79-
// 切り捨てるフレームがパレットを持っている場合パレットの移動も行う。
78+
// 最大容量か最大フレーム数が設定されている場合、それらを超過したフレームをここで切り捨てる。
79+
// 切り捨てるフレームがパレットを持っている場合パレットの移動も行う。
8080

81-
// 実行中のタスクが更新中のデータを間引くのはマズいので、更新中は最低でもタスク数分は残す
81+
// 実行中のタスクが更新中のデータを間引くのはマズいので、更新中は最低でもタスク数分は残す
8282
int min_frames = updating ? std::max<int>(m_conf.max_active_tasks, 1) : 1;
8383

84-
// 最大フレーム数超えてたら間引く
84+
// 最大フレーム数超えてたら間引く
8585
if (m_conf.max_frame > 0)
8686
{
8787
while (m_conf.max_frame > min_frames && m_gif_buffers.size() > m_conf.max_frame)
@@ -90,7 +90,7 @@ void fcGifContext::scrape(bool updating)
9090
}
9191
}
9292

93-
// 最大容量超えてたら間引く
93+
// 最大容量超えてたら間引く
9494
if (m_conf.max_data_size > 0)
9595
{
9696
size_t size = 14; // gif header + footer size
@@ -116,7 +116,7 @@ void fcGifContext::addFrameTask(jo_gif_frame_t &o_fdata, const std::string &raw_
116116

117117
bool fcGifContext::addFrame(void *tex)
118118
{
119-
// 実行中のタスクの数が上限に達している場合適当に待つ
119+
// 実行中のタスクの数が上限に達している場合適当に待つ
120120
if (m_active_task_count >= m_conf.max_active_tasks)
121121
{
122122
std::this_thread::sleep_for(std::chrono::milliseconds(10));
@@ -127,20 +127,20 @@ bool fcGifContext::addFrame(void *tex)
127127
}
128128
int frame = m_frame++;
129129

130-
// フレームバッファの内容取得
130+
// フレームバッファの内容取得
131131
std::string& raw_buffer = m_raw_buffers[frame % m_conf.max_active_tasks];
132132
if (!fcGetGraphicsDevice()->readTexture(&raw_buffer[0], raw_buffer.size(), tex, m_conf.width, m_conf.height, fcE_ARGB32))
133133
{
134134
--frame;
135135
return false;
136136
}
137137

138-
// gif データを生成
138+
// gif データを生成
139139
m_gif_buffers.push_back(jo_gif_frame_t());
140140
jo_gif_frame_t& fdata = m_gif_buffers.back();
141141
bool local_palette = frame==0 || (m_conf.keyframe != 0 && frame % m_conf.keyframe == 0);
142142
if (local_palette) {
143-
// パレットの更新は前後のフレームに影響をあたえるため、同期更新でなければならない
143+
// パレットの更新は前後のフレームに影響をあたえるため、同期更新でなければならない
144144
m_tasks.wait();
145145
addFrameTask(fdata, raw_buffer, frame, local_palette);
146146
}
@@ -188,7 +188,7 @@ void fcGifContext::write(std::ostream &os, int begin_frame, int end_frame)
188188
std::advance(begin, begin_frame);
189189
std::advance(end, end_frame);
190190

191-
// パレット探索
191+
// パレット探索
192192
auto palette = begin;
193193
while (palette->palette.empty()) { --palette; }
194194

@@ -268,7 +268,7 @@ int fcGifContext::getExpectedDataSize(int begin_frame, int end_frame)
268268
{
269269
if (i == begin) {
270270
if (m_gif.repeat >= 0) { size += 19; }
271-
// パレット探索
271+
// パレット探索
272272
if (begin->palette.empty())
273273
{
274274
auto palette = begin;

Plugin/fcGraphicsDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22

33

44
// Graphics device identifiers in Unity

Plugin/fcGraphicsDeviceD3D9.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "FrameCapturer.h"
33
#include "fcGraphicsDevice.h"
44

@@ -134,8 +134,8 @@ bool fcGraphicsDeviceD3D9::readTexture(void *o_buf, size_t bufsize, void *tex_,
134134
HRESULT hr;
135135
IDirect3DTexture9 *tex = (IDirect3DTexture9*)tex_;
136136

137-
// D3D11 と同様 render target の内容は CPU からはアクセス不可能になっている。
138-
// staging texture を用意してそれに内容を移し、CPU はそれ経由でデータを読む。
137+
// D3D11 と同様 render target の内容は CPU からはアクセス不可能になっている。
138+
// staging texture を用意してそれに内容を移し、CPU はそれ経由でデータを読む。
139139
IDirect3DSurface9 *surf_dst = findOrCreateStagingTexture(width, height, format);
140140
if (surf_dst == nullptr) { return false; }
141141

@@ -156,8 +156,8 @@ bool fcGraphicsDeviceD3D9::readTexture(void *o_buf, size_t bufsize, void *tex_,
156156
const char *rpixels = (const char*)locked.pBits;
157157
int rpitch = locked.Pitch;
158158

159-
// D3D11 と同様表向き解像度と内部解像度が違うケースを考慮
160-
// (しかし、少なくとも手元の環境では常に wpitch == rpitch っぽい)
159+
// D3D11 と同様表向き解像度と内部解像度が違うケースを考慮
160+
// (しかし、少なくとも手元の環境では常に wpitch == rpitch っぽい)
161161
if (wpitch == rpitch)
162162
{
163163
memcpy(wpixels, rpixels, bufsize);
@@ -173,7 +173,7 @@ bool fcGraphicsDeviceD3D9::readTexture(void *o_buf, size_t bufsize, void *tex_,
173173
}
174174
surf_dst->UnlockRect();
175175

176-
// D3D9 ではピクセルの並びは BGRA になっているので並べ替える
176+
// D3D9 ではピクセルの並びは BGRA になっているので並べ替える
177177
switch (format)
178178
{
179179
case fcE_ARGB32: BGRA_RGBA_conversion((RGBA<uint8_t>*)o_buf, bufsize / 4); break;
@@ -197,7 +197,7 @@ bool fcGraphicsDeviceD3D9::writeTexture(void *o_tex, int width, int height, fcET
197197
HRESULT hr;
198198
IDirect3DTexture9 *tex = (IDirect3DTexture9*)o_tex;
199199

200-
// D3D11 と違い、D3D9 では書き込みも staging texture を経由する必要がある。
200+
// D3D11 と違い、D3D9 では書き込みも staging texture を経由する必要がある。
201201
IDirect3DSurface9 *surf_src = findOrCreateStagingTexture(width, height, format);
202202
if (surf_src == nullptr) { return false; }
203203

Plugin/fcGraphicsDeviceOpenGL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "FrameCapturer.h"
33
#include "fcGraphicsDevice.h"
44

Plugin/fcThreadPool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "fcThreadPool.h"
33

44
#ifndef fcWithTBB

Plugin/fcThreadPool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifndef fcThreadPool_h
1+
#ifndef fcThreadPool_h
22
#define fcThreadPool_h
33

44
#ifndef fcWithTBB

0 commit comments

Comments
 (0)