Skip to content

Commit

Permalink
DoomView - WIP
Browse files Browse the repository at this point in the history
Add Walls
  • Loading branch information
MackValentine committed Oct 17, 2024
1 parent 82966ad commit 079ab79
Show file tree
Hide file tree
Showing 6 changed files with 405 additions and 39 deletions.
11 changes: 11 additions & 0 deletions src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,8 @@ bool Game_Interpreter::ExecuteCommand(lcf::rpg::EventCommand const& com) {
return CommandManiacControlStrings(com);
case Cmd::Maniac_CallCommand:
return CommandManiacCallCommand(com);
case 9900:
return CommandSetDoomMap(com);
case 9901:
return Command3DPicture(com);
case 9902:
Expand Down Expand Up @@ -5209,3 +5211,12 @@ bool Game_Interpreter::CommandGet3DPictureRotate(lcf::rpg::EventCommand const& c
return true;
}

bool Game_Interpreter::CommandSetDoomMap(lcf::rpg::EventCommand const& com) {

int picID = ValueOrVariable(com.parameters[0], com.parameters[1]);

Main_Data::game_pictures->ShowDoomMap(picID);

return true;
}

1 change: 1 addition & 0 deletions src/game_interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ class Game_Interpreter
bool Command3DPicture(lcf::rpg::EventCommand const& com);
bool Command3DPictureRotate(lcf::rpg::EventCommand const& com);
bool CommandGet3DPictureRotate(lcf::rpg::EventCommand const& com);
bool CommandSetDoomMap(lcf::rpg::EventCommand const& com);

int DecodeInt(lcf::DBArray<int32_t>::const_iterator& it);
const std::string DecodeString(lcf::DBArray<int32_t>::const_iterator& it);
Expand Down
14 changes: 14 additions & 0 deletions src/game_pictures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ void Game_Pictures::Get3DRotation(int picID, int vx, int vy, int vz) {
auto& pic = GetPicture(picID);
pic.Get3DRotation(vx, vy, vz);
}
void Game_Pictures::ShowDoomMap(int picID) {
auto& pic = GetPicture(picID);
pic.ShowDoomMap();
}

void Game_Pictures::Picture::Show3D(std::string n, int zoom, int dx, int dy, int rx, int ry, int rz) {
pic3D = new Spriteset_MapDoom(n, zoom, dx, dy, rx, ry, rz);
Expand All @@ -698,4 +702,14 @@ void Game_Pictures::Picture::Get3DRotation(int vx, int vy, int vz) {
}
}

void Game_Pictures::Picture::ShowDoomMap() {
pic3D = new Spriteset_MapDoom();

if (!sprite) {
CreateSprite();
needs_update = true;
}

}


2 changes: 2 additions & 0 deletions src/game_pictures.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class Game_Pictures {
void Show3D(std::string n, int picID, int zoom, int dx, int dy, int rx, int ry, int rz);
void Rotate3D(int picID, int rx, int ry, int rz);
void Get3DRotation(int picID, int vx, int vy, int vz);
void ShowDoomMap(int picID);
void Erase(int id);
void EraseAll();

Expand Down Expand Up @@ -136,6 +137,7 @@ class Game_Pictures {
void Show3D(std::string n, int zoom, int dx, int dy, int rx, int ry, int rz);
void Rotate3D(int rx, int ry, int rz);
void Get3DRotation(int vx, int vy, int vz);
void ShowDoomMap();
Spriteset_MapDoom* pic3D = nullptr;
};

Expand Down
Loading

0 comments on commit 079ab79

Please sign in to comment.