Skip to content

Commit c09ec75

Browse files
committed
Add Maniac Zoom Event command and maniac_image_data chunk
1 parent 0900dd5 commit c09ec75

7 files changed

Lines changed: 24 additions & 2 deletions

File tree

generator/csv/enums_easyrpg.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ EventCommand,Code,Maniac_WritePicture,3026
3737
EventCommand,Code,Maniac_AddMoveRoute,3027
3838
EventCommand,Code,Maniac_EditTile,3028
3939
EventCommand,Code,Maniac_ControlTextProcessing,3029
40+
EventCommand,Code,Maniac_Zoom,3032
4041
EventPage,ManiacEventInfo,action,0
4142
EventPage,ManiacEventInfo,touched,1
4243
EventPage,ManiacEventInfo,collision,2

generator/csv/fields_easyrpg.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SavePicture,easyrpg_flip,f,Enum<EasyRpgFlip>,0xC8,0,0,1,How to flip the picture
1717
SavePicture,easyrpg_blend_mode,f,Int32,0xC9,0,0,1,Blend mode to use for blit. See Bitmap::BlendMode
1818
SavePicture,easyrpg_type,f,Enum<EasyRpgPictureType>,0xCA,0,0,1,Type of this picture
1919
SavePicture,maniac_current_magnify_height,f,Double,0x0A,100.0,0,0,Current zoom level of picture (y direction).
20+
SavePicture,maniac_image_data,f,Vector<UInt8>,0x1C,,0,0,Deflate compressed image data of a picture modified with EditPicture command
2021
SavePicture,maniac_finish_magnify_height,f,Int32,0x24,100,0,0,Final zoom level to animate picture to (y direction).
2122
SaveEasyRpgWindow,texts,f,Array<SaveEasyRpgText>,0x01,,0,0,Texts to render
2223
SaveEasyRpgWindow,width,f,Int32,0x02,0,0,0,Window width (px)

src/generated/lcf/lsd/chunks.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ namespace LSD_Reader {
348348
easyrpg_type = 0xCA,
349349
/** Current zoom level of picture (y direction). */
350350
maniac_current_magnify_height = 0x0A,
351+
/** Deflate compressed image data of a picture modified with EditPicture command */
352+
maniac_image_data = 0x1C,
351353
/** Final zoom level to animate picture to (y direction). */
352354
maniac_finish_magnify_height = 0x24
353355
};

src/generated/lcf/rpg/eventcommand.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ namespace rpg {
192192
Maniac_WritePicture = 3026,
193193
Maniac_AddMoveRoute = 3027,
194194
Maniac_EditTile = 3028,
195-
Maniac_ControlTextProcessing = 3029
195+
Maniac_ControlTextProcessing = 3029,
196+
Maniac_Zoom = 3032
196197
};
197198
static constexpr auto kCodeTags = lcf::EnumTags{
198199
Code::END, "END",
@@ -358,7 +359,8 @@ namespace rpg {
358359
Code::Maniac_WritePicture, "Maniac_WritePicture",
359360
Code::Maniac_AddMoveRoute, "Maniac_AddMoveRoute",
360361
Code::Maniac_EditTile, "Maniac_EditTile",
361-
Code::Maniac_ControlTextProcessing, "Maniac_ControlTextProcessing"
362+
Code::Maniac_ControlTextProcessing, "Maniac_ControlTextProcessing",
363+
Code::Maniac_Zoom, "Maniac_Zoom"
362364
};
363365

364366
int32_t code = 0;

src/generated/lcf/rpg/savepicture.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <array>
1717
#include <stdint.h>
1818
#include <string>
19+
#include <vector>
1920
#include "lcf/enum_tags.h"
2021
#include "lcf/context.h"
2122
#include <ostream>
@@ -161,6 +162,7 @@ namespace rpg {
161162
int32_t easyrpg_blend_mode = 0;
162163
int32_t easyrpg_type = 0;
163164
double maniac_current_magnify_height = 100.0;
165+
std::vector<uint8_t> maniac_image_data;
164166
int32_t maniac_finish_magnify_height = 100;
165167
};
166168
inline std::ostream& operator<<(std::ostream& os, SavePicture::Effect code) {
@@ -237,6 +239,7 @@ namespace rpg {
237239
&& l.easyrpg_blend_mode == r.easyrpg_blend_mode
238240
&& l.easyrpg_type == r.easyrpg_type
239241
&& l.maniac_current_magnify_height == r.maniac_current_magnify_height
242+
&& l.maniac_image_data == r.maniac_image_data
240243
&& l.maniac_finish_magnify_height == r.maniac_finish_magnify_height;
241244
}
242245

src/generated/lsd_savepicture.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,13 @@ static TypedField<rpg::SavePicture, double> static_maniac_current_magnify_height
314314
0,
315315
0
316316
);
317+
static TypedField<rpg::SavePicture, std::vector<uint8_t>> static_maniac_image_data(
318+
&rpg::SavePicture::maniac_image_data,
319+
LSD_Reader::ChunkSavePicture::maniac_image_data,
320+
"maniac_image_data",
321+
0,
322+
0
323+
);
317324
static TypedField<rpg::SavePicture, int32_t> static_maniac_finish_magnify_height(
318325
&rpg::SavePicture::maniac_finish_magnify_height,
319326
LSD_Reader::ChunkSavePicture::maniac_finish_magnify_height,
@@ -367,6 +374,7 @@ Field<rpg::SavePicture> const* Struct<rpg::SavePicture>::fields[] = {
367374
&static_easyrpg_blend_mode,
368375
&static_easyrpg_type,
369376
&static_maniac_current_magnify_height,
377+
&static_maniac_image_data,
370378
&static_maniac_finish_magnify_height,
371379
NULL
372380
};

src/generated/rpg_savepicture.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ std::ostream& operator<<(std::ostream& os, const SavePicture& obj) {
6767
os << ", easyrpg_blend_mode="<< obj.easyrpg_blend_mode;
6868
os << ", easyrpg_type="<< obj.easyrpg_type;
6969
os << ", maniac_current_magnify_height="<< obj.maniac_current_magnify_height;
70+
os << ", maniac_image_data=";
71+
for (size_t i = 0; i < obj.maniac_image_data.size(); ++i) {
72+
os << (i == 0 ? "[" : ", ") << obj.maniac_image_data[i];
73+
}
74+
os << "]";
7075
os << ", maniac_finish_magnify_height="<< obj.maniac_finish_magnify_height;
7176
os << "}";
7277
return os;

0 commit comments

Comments
 (0)