Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upZVISION: More complete engine implementation #532
Conversation
This comment has been minimized.
This comment has been minimized.
RichieSams
commented on 82348a7
Oct 22, 2013
|
What is the difference between this class and Control? The only thing I can find so far is SideFXType _type and it's being set in the constructor, but never used. |
This comment has been minimized.
This comment has been minimized.
bluegr
replied
Oct 31, 2013
|
I don't understand this. Why are you trying to rewrite the Control class into this class? Are there any actual benefits, apart from trying to remove inheritance? |
This comment has been minimized.
This comment has been minimized.
|
Basic different between control and sidefx is in interactions with user and type-specific. Control produce interactions and results, sidefx class produce only some results. action:kill and action:stop works only with sidefx objects. Additionally action:kill can interact with many sidefx objects like action:kill("ALL") or action:kill("AUDIO"). As well controls may use Mouse and Key interaction methods thats not needed in sidefx. In other words combine it in one class will cause many complication of code and simple graphical methods will be clogged by workarounds. |
This comment has been minimized.
This comment has been minimized.
RichieSams
commented on 2e0e9dc
Oct 27, 2013
|
All my .scr files read as such: event:change_location(T,E,10,1139) |
This comment has been minimized.
This comment has been minimized.
|
Do you test it on real games, on Grand Inquisitor? Or only on syntetic
tests from console?
2013/10/27 RichieSams notifications@github.com
… All my .scr files read as such: event:change_location(T,E,10,1139)
—
Reply to this email directly or view it on GitHubhttps://github.com/Marisa-Chan/scummvm/commit/2e0e9dc1f64451485532bbd5b3532b6155288f6c#commitcomment-4435871
.
|
This comment has been minimized.
This comment has been minimized.
RichieSams
replied
Oct 27, 2013
|
Yea that's a line from a ZNem .scr file |
This comment has been minimized.
This comment has been minimized.
|
And this line from GI
action:change_location(p, s, 10, 874)
2013/10/27 RichieSams notifications@github.com
… Yea that's a line from a ZNem .src file
—
Reply to this email directly or view it on GitHubhttps://github.com/Marisa-Chan/scummvm/commit/2e0e9dc1f64451485532bbd5b3532b6155288f6c#commitcomment-4436234
.
|
This comment has been minimized.
This comment has been minimized.
RichieSams
replied
Oct 27, 2013
|
:( Kk. I need to look into sscanf anyway due to locale making reading floating-points wrong. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, I also found this problem and will provide some solution after
reorgonize engine with according to new reversed details. Without it engine
will produce some bugs. And original engines are litle different in many
things.
P.S. For reading float point values original engines use atof.
|
engine.
|
I haven't gone throught the commits/code yet, but this looks like a lot has been improved. Nice work. Could you maybe summarize the current status of the engine? (Since there's no description on the pull request.) |
|
Implemented all base code and functionality. Games should be completable but massive testing is needed. |
| next_loc.view = stream->readByte(); | ||
| next_loc.offset = stream->readUint32LE() & 0x0000FFFF; | ||
|
|
||
| // What the fck, eos is not 'return pos >= size' |
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 17, 2014
Member
This sounds like a bug (and please remove the swear word). Perhaps the parent stream is not returning the EOS correctly
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 18, 2014
Member
Is it? I thought that these two should be equivalent:
while (!stream->eos())
and
while (stream->pos() < stream->size())
if pos() >= size(), then the eos flag should be set
This comment has been minimized.
This comment has been minimized.
wjp
Nov 18, 2014
Member
No, that's just wrong.
See https://github.com/scummvm/scummvm/blob/master/common/stream.h#L171
| private: | ||
| ZVision *_engine; | ||
|
|
||
| struct script_scope { |
This comment has been minimized.
This comment has been minimized.
|
|
||
| PuzzleList *scope_queue; // For adding puzzles to queue | ||
| PuzzleList *exec_queue; // Switch to it when execute | ||
| PuzzleList _priv_queue_one; |
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 17, 2014
Member
Why do you use an underscore prefix here? We use underscore prefixes for global variables in ScummVM
This comment has been minimized.
This comment has been minimized.
clone2727
Nov 17, 2014
Contributor
We don't use the underscore prefix for global variables. It's for class
variables. The struct should be consistent, though.
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 18, 2014
Member
Yes, I should have said class member variables here. Here's the page with our code formatting conventions, esp. variable naming.
http://wiki.scummvm.org/index.php/Code_Formatting_Conventions#Naming
| struct puzzle_ref { | ||
| Puzzle *puz; | ||
| script_scope *scope; | ||
| }; |
This comment has been minimized.
This comment has been minimized.
| // TODO: Implement FistControl | ||
| // TODO: Implement HotMovieControl | ||
| // TODO: Implement PaintControl | ||
| // TODO: Implement TilterControl |
This comment has been minimized.
This comment has been minimized.
|
|
||
| namespace ZVision { | ||
|
|
||
| DistortNode::DistortNode(ZVision *engine, uint32 key, int16 speed, float st_angl, float en_angl, float st_lin, float en_lin) |
This comment has been minimized.
This comment has been minimized.
| //int16 x; | ||
| //int16 y; | ||
| //uint16 w; | ||
| //uint16 h; |
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 17, 2014
Member
These should probably be removed now, since they are contained in the rect above
| break; | ||
| } | ||
|
|
||
| // Crush each octet pair to a single octet with a simple cast |
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 17, 2014
Member
This doesn't look endian-safe... you should either use the endian-safe functions in endian.h, or add an if (SCUMMVM_BIG_ENDIAN) check
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
wjp
Nov 18, 2014
Member
The comments and variable names are confusing, though. "asciiString" doesn't seem to be ASCII, and I'm not sure what "Crush each octet pair to a single octet with a simple cast" refers to.
This comment has been minimized.
This comment has been minimized.
RichieSams
Nov 18, 2014
Contributor
That's my old comment. The text files assume UTF16. However, we don't currently support UTF16. My old code just naively truncated the uint16 to a single byte
| #ifndef ZVISION_INVENTORY_MANAGER_H | ||
| #define ZVISION_INVENTORY_MANAGER_H | ||
| #ifndef ZVISION_WINKEY_H | ||
| #define ZVISION_WINKEY_H |
This comment has been minimized.
This comment has been minimized.
|
Huge renamings applied. Maybe something is missed. |
|
|
||
| if (checkCode("MIKESPANTS")) { | ||
| _scriptManager->changeLocation('g', 'j', 't', 'm', 0); | ||
| } |
This comment has been minimized.
This comment has been minimized.
bluegr
Nov 23, 2014
Member
Just to add to this list: there are 3 more cheats in ZGI - "EAT ME", "WHOAMI" and "HUISOK". Check here:
http://www.mrbillsadventureland.com/amusing/funthings/zorkF/zgiF.htm
This comment has been minimized.
This comment has been minimized.
Marisa-Chan
Dec 1, 2014
Author
Contributor
Those cheats are scripted in gjcr.scr, hp1e.scr, uh1f.scr
This comment has been minimized.
This comment has been minimized.
|
Overall, there are huge changes here, all major improvements, and almost all of the missing features have been implemented. Great work! IMHO, this can be merged as-is, and any further development can continue in-tree. Some rough edges might need to be fixed here and there, but they're all minor issues. Unless anyone objects, I'll merge this by tomorrow night (Tuesday, the 2nd of November). |
|
I agree with @bluegr. Any further changes can be done in-branch. (Though I think you mean the 2nd of December :P) I finally have a free week this week. So I intend to look further into the changes. |
|
Merging as mentioned already. Great work, thanks! Further changes will be continued in-tree |
ZVISION: More complete engine implementation
This comment has been minimized.
This comment has been minimized.
|
The bracket syntax is C99. Do all our platforms support this? |
Marisa-Chan commentedNov 17, 2014
No description provided.