-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Tokeiburu/lub-effect
Small fixes for lub effects and basic support for 0x207
- Loading branch information
Showing
14 changed files
with
231 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "LubChangeTextureAction.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
#include "Action.h" | ||
#include <browedit/components/Rsw.h> | ||
#include <browedit/components/RsmRenderer.h> | ||
#include <browedit/components/GndRenderer.h> | ||
#include <browedit/components/WaterRenderer.h> | ||
|
||
class LubChangeTextureAction : public Action | ||
{ | ||
std::string oldValue; | ||
std::string newValue; | ||
LubEffect* lubEffect; | ||
public: | ||
LubChangeTextureAction(LubEffect *lubEffect, std::string oldValue, std::string newValue) | ||
{ | ||
this->lubEffect = lubEffect; | ||
this->oldValue = oldValue; | ||
this->newValue = newValue; | ||
} | ||
|
||
virtual void perform(Map* map, BrowEdit* browEdit) | ||
{ | ||
this->lubEffect->texture = newValue; | ||
this->lubEffect->dirty = true; | ||
} | ||
virtual void undo(Map* map, BrowEdit* browEdit) | ||
{ | ||
this->lubEffect->texture = oldValue; | ||
this->lubEffect->dirty = true; | ||
} | ||
virtual std::string str() | ||
{ | ||
return "Texture changed to " + newValue; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.