Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maniacs Feature - Partially implement command GetGameInfo (3021) #3309

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ToolMan2k
Copy link
Contributor

This commit partially implements command #3021 from Maniac Patch, which can returns things from screen coordinate/size to screen pixel data.

I've opted to implement most of its features, the reason for these omissions were:

  1. Handling the tile/pixel functions would be better suited for someone who delves into these systems;
  2. I do not have a good grasps on how the "Command Interpreter State" functions. There is a bit of documentation on the README.txt file in Maniacs;

I have implemented the following commands:
0- Get Map Size: returns the width and height of the map;
2- Get Window Info: returns the width and height of the screen;
5- Get Tileset ID: returns the current tileset ID;
6- Get Actor/Message Face: returns the face string/index for either the current message box or an actor. Dynamic toggles between the current or default sprite;
7- Get Actor/Vehicle/Event Body: returns the sprite string/index for either a map event or an actor. Dynamic toggles between the current or default sprite;
8- Get Screen Position: returns the X and Y coordinates of the camera;
9- Get Screen Shake: returns the current shake value of the screen;
10- Get BGM: returns the current BGM string/parameters.

I've made a few tests and it seems to be stable, however it deserves some extra shaking, in case of differing behavior or crashes.

Currently added the following:
0: Get Map size
2: Window Size
5: Tileset ID
6: Face ID (partial) only for actors, not messages
Added new functions for the following:
6: Get player/message portrait
7: Get player/event sprite
8: Get Screen position
9: Get Screen shake offset
10: Get Current BGM
@Ghabry Ghabry self-requested a review December 19, 2024 00:26
@Ghabry Ghabry added this to the 0.8.1 milestone Dec 19, 2024
@Ghabry
Copy link
Member

Ghabry commented Dec 19, 2024

Thanks for the contribution! Looks fine to me. I will only add some utility functions (e.g. so that the "static" lookup can be as simple as the "dynamic" lookup).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants