Skip to content

Commit e783c48

Browse files
committed
コード整理
1 parent fab539d commit e783c48

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

examples/sumomo/src/sdl_renderer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
#include <libyuv/video_common.h>
1010
#include <rtc_base/logging.h>
1111

12-
#define STD_ASPECT 1.33
13-
#define WIDE_ASPECT 1.78
14-
#define FRAME_INTERVAL (1000 / 30)
15-
1612
SDLRenderer::SDLRenderer(int width, int height, bool fullscreen)
1713
: BaseRenderer(width, height, 30),
1814
window_(nullptr),

examples/sumomo/src/sixel_renderer.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include <libyuv/video_common.h>
1818
#include <rtc_base/logging.h>
1919

20-
#define FRAME_INTERVAL (1000 / 10) // 10 FPS for terminal display
21-
2220
SixelRenderer::SixelRenderer(int width, int height)
2321
: BaseRenderer(width, height, 10) {
2422
InitializeColorLookupTable();
@@ -179,7 +177,6 @@ void SixelRenderer::OutputSixel(const uint8_t* rgb_data,
179177
// 6行ずつ処理
180178
for (int y = 0; y < height; y += 6) {
181179
// 各色について6行分のデータを出力
182-
bool first_color = true;
183180
for (const auto& [color, index] : palette_map_) {
184181
std::vector<uint8_t> sixel_line;
185182
bool has_pixels = false;
@@ -201,10 +198,7 @@ void SixelRenderer::OutputSixel(const uint8_t* rgb_data,
201198

202199
// この色にピクセルがある場合のみ出力
203200
if (has_pixels) {
204-
if (!first_color) {
205-
output += "$"; // 行の最初に戻る
206-
}
207-
first_color = false;
201+
output += "$"; // 行の最初に戻る
208202

209203
output += "#";
210204
output += std::to_string(index);

0 commit comments

Comments
 (0)