Commit Graph

356 Commits

Author SHA1 Message Date
richiesams
2faaf8488b ZVISION: Convert ResultAction pointers to SharePtr
This gets rid of the need for specific destruction as well as making the copy swap
operations in the ScriptManger _referenceTable more efficient
2013-08-04 13:33:04 -05:00
richiesams
cf45312016 ZVISION: Fix unsigned/signed mismatch warning 2013-08-04 13:33:03 -05:00
richiesams
99ecc80e86 ZVISION: Initialize iterator 2013-08-04 13:33:02 -05:00
richiesams
3df425004d ZVISION: Remove superfluous comma 2013-08-04 13:33:01 -05:00
richiesams
4729641cf9 ZVISION: Fix typo in format string 2013-08-04 13:33:01 -05:00
richiesams
8e3ffdece8 ZVISION: Initialize _needsScreenUpdate in RenderManager 2013-08-04 13:33:00 -05:00
richiesams
d43e1e9741 ZVISION: Add filename parsing for ActionPlayAnimation 2013-08-04 13:33:00 -05:00
richiesams
87f2e9a894 ZVISION: Update module.mk with current obj 2013-08-04 13:32:59 -05:00
richiesams
e170be4ea5 ZVISION: Remove redundant class qualifier 2013-08-04 13:32:59 -05:00
richiesams
8ec0a90611 ZVISION: Convert _blockSize to an anonymous enum 2013-08-04 13:32:58 -05:00
richiesams
903e21b8af ZVISION: Initialize the iterator 2013-08-04 13:32:57 -05:00
richiesams
d06083aa96 ZVISION: Convert sscanf formats to follow new int lengths 2013-08-04 13:32:57 -05:00
richiesams
5e442c363e ZVISION: Convert String pointers to const references 2013-08-04 13:32:56 -05:00
richiesams
f1135292d0 ZVISION: Optimize integer type usages
The general thought is int is faster than int16 or byte. So if you can afford the
space, use it over int16 or byte. Also, only use int32 when you specifically need
the 32 bits.
2013-08-04 13:32:55 -05:00
Filippos Karapetis
89d8496dba ZVISION: Add detection entry and directories for ZGI 2013-08-04 13:32:55 -05:00
richiesams
f39e1fdc43 ZVISION: Move CriteriaOperator, Criteria, and StateFlag inside the Puzzle class 2013-08-04 13:32:54 -05:00
richiesams
f975fbe521 ZVISION: Move Puzzle logic into a .cpp file 2013-08-04 13:32:54 -05:00
richiesams
ea47c28ddf ZVISION: Make ActionNode::process() pure virtual 2013-08-04 13:32:53 -05:00
richiesams
00eb279243 ZVISION: Create ScriptManager member function to change location 2013-08-04 13:32:53 -05:00
richiesams
070042fcb4 ZVISION: Modify Control parsing to use new Control class structure 2013-08-04 13:32:52 -05:00
richiesams
d4ae293f88 ZVISION: Rename parseResult() to parseResults() 2013-08-04 13:32:52 -05:00
richiesams
2063cb711d ZVISION: Add 'reverse' to _tiltOptions and _panoramaOptions to handle Control options 2013-08-04 13:32:51 -05:00
richiesams
48a3a1530d ZVISION: Move the criteriaMet bool outside of the loop
Only fire off the Results of ALL of the criteria are met
2013-08-04 13:32:51 -05:00
richiesams
c22c91b7d3 ZVISION: Create Control class 2013-08-04 13:32:50 -05:00
richiesams
b20437a17d ZVISION: Modify Criteria parsing to handle empty Criteria 2013-08-04 13:32:50 -05:00
richiesams
cf9790a9d6 ZVISION: Create mutators for _tiltOptions 2013-08-04 13:32:49 -05:00
richiesams
7d58ebf281 ZVISION: Convert Puzzle to a class
It needed a copy constructor and destructor to handle the heap memory ResultActions
2013-08-04 13:32:49 -05:00
richiesams
93c6670f6f ZVISION: Create clone member function for ResultAction class 2013-08-04 13:32:48 -05:00
Filippos Karapetis
032afd3c1a ZVISION: Fix compilation 2013-08-04 13:32:48 -05:00
Filippos Karapetis
1c551d4359 ZVISION: Only scale videos when needed
This avoids crashes for videos that exceed the screen size when scaled
2013-08-04 13:32:47 -05:00
richiesams
e076d8e52f ZVISION: Change default panorama FoV to 27 degrees
This is to match Marisa Chan's implementation. Images at this FoV also look better.
2013-08-04 13:32:47 -05:00
richiesams
8f3e27cbd0 ZVISION: Fix closing braces on generateTiltLookupTable 2013-08-04 13:32:46 -05:00
richiesams
0e4e6ee9bf ZVISION: Create methods for altering panoramaOptions and create console commands for them 2013-08-04 13:32:46 -05:00
richiesams
b9dd61437c ZVISION: Create class for ActionDelayRender 2013-08-04 13:32:45 -05:00
richiesams
5376aa7b3c ZVISION: Move generating the RenderTable to outside setRenderState
This allows the panorama/tilt options to mutated without having to generate the table multiple times.
2013-08-04 13:32:45 -05:00
richiesams
564379d3ee ZVISION: Create method to get RenderTable object pointer from RenderManager
Remove passthrough methods
2013-08-04 13:32:44 -05:00
richiesams
48b9741f41 ZVISION: Rename Point template class to Vector2
Also remove templating
2013-08-04 13:32:44 -05:00
richiesams
f8bc82080a ZVISION: Create function for mixing two RGB<555> colors 2013-08-04 13:32:43 -05:00
richiesams
4acdf5b7d5 ZVISION: Convert panoramaOptions and tiltOptions to floats 2013-08-04 13:32:43 -05:00
richiesams
a23970bbc6 ZVISION: Convert RenderTable to only storing (x,y) offsets instead of absolute postions.
This allows the destRectangle to be offset within the RenderTable
2013-08-04 13:32:42 -05:00
richiesams
611ff31a56 ZVISION: Copy Point struct from rect.h and turn it into a templated class 2013-08-04 13:32:41 -05:00
richiesams
34b3a78898 ZVISION: Fix error causing image discontinutities
The width and height were swapped when passed to the class constructor.
2013-08-04 13:32:41 -05:00
richiesams
c8359ad56c ZVISION: Modify loadImage console command to account for new render options 2013-08-04 13:32:40 -05:00
richiesams
3d223e2123 ZVISION: Modify the RenderTable panorama math to account for panoramas being transposed 2013-08-04 13:32:39 -05:00
richiesams
2349fcfd31 ZVISION: Modify renderImageToScreen to take into account the current RenderState 2013-08-04 13:32:39 -05:00
richiesams
364e9d659c ZVISION: Force all files to be registered with SearchMan as 'flat'
There are 10 file name conflicts as a result, but the conflicts are byte identical.
2013-08-04 13:32:38 -05:00
richiesams
65a08c71c6 ZVISION: Fix unsigned/signed compiler warning 2013-08-04 13:32:37 -05:00
richiesams
df2e78e6f8 ZVISION: Remove variable used for debugging purposes 2013-08-04 13:32:37 -05:00
richiesams
73f02759f9 ZVISION: Remove supurflouous 'const' and add 'inline' 2013-08-04 13:32:36 -05:00
richiesams
88934cd5d0 ZVISION: Convert console code to use RenderManager and add method for setRenderState 2013-08-04 13:32:35 -05:00
richiesams
de2e7fd144 ZVISION: Convert error() to warning()
I did not realize the intended behavior of error() is to close the application
2013-08-04 13:32:35 -05:00
richiesams
ed44907309 ZVISION: Move rendering logic from ZVision class to RenderManager class 2013-08-04 13:32:34 -05:00
richiesams
cd51b646f3 ZVISION: Create a class for handling all render table logic
Aka, creating the lookup tables, storing the current render state, and eventually doing
the image mutations.
2013-08-04 13:32:33 -05:00
richiesams
9e6b2dfc12 ZVISION: Create member function for creating a panorama look up table 2013-08-04 13:32:33 -05:00
richiesams
b3eb48996a ZVISION: Fix memory leaks 2013-08-04 13:32:32 -05:00
richiesams
2bfefd9691 ZVISION: Remove extraneous file 2013-08-04 13:32:32 -05:00
richiesams
4bd95987d2 ZVISION: Convert old code to use RenderManager 2013-08-04 13:32:31 -05:00
richiesams
6d7541a430 ZVISION: Create RenderManager class and move code from image.cpp 2013-08-04 13:32:30 -05:00
richiesams
94000e0781 ZVISION: Replace includes with forward declarations 2013-08-04 13:32:29 -05:00
richiesams
4713640779 ZVISION: Remove extraneous member variable 2013-08-04 13:32:29 -05:00
richiesams
d546e11cf1 ZVISION: Fix namespace indentation 2013-08-04 13:32:28 -05:00
richiesams
b316df9e82 ZVISION: Add a return statement for when image load fails 2013-08-04 13:32:27 -05:00
richiesams
47161ef30d ZVISION: LZSSReadStream - Decompress directly to the destination buffer instead of an intermediate buffer 2013-08-04 13:32:27 -05:00
richiesams
125a061a96 ZVISION: Convert to using MKTAG() instead of checking each char individually 2013-08-04 13:32:26 -05:00
richiesams
1c44fe7afb ZVISION: Fix the error causing distortions in the sound 2013-08-04 13:32:26 -05:00
richiesams
8f32592ab9 ZVISION: Create console command to use the raw2wav function 2013-08-04 13:32:25 -05:00
richiesams
32f8848605 ZVISION: Create utility function to convert .RAW to .WAV 2013-08-04 13:32:25 -05:00
richiesams
7644e00bf3 ZVISION: Convert ResultActions to take a String pointer in their constructors
There's no point in copying the String since it's just being parsed
2013-08-04 13:32:24 -05:00
richiesams
e897a1bb2a ZVISION: Fix logic concerning whether a stream is packed or not
It was accidentally returning a raw stream for a ZorkStream and a ZorkStream for a raw
2013-08-04 13:32:24 -05:00
richiesams
134f8fda17 ZVISION: Fix incorrect assumptions about a file being stereo 2013-08-04 13:32:23 -05:00
richiesams
03c871ff30 ZVISION: Convert _stereo to a byte since it is used for a bitwise and 2013-08-04 13:32:23 -05:00
richiesams
d771b615e0 ZVISION: Use individual initialization instead of inline. 2013-08-04 13:32:22 -05:00
richiesams
c7ce580bbd ZVISION: Removed 'packed' audio handling from RawZorkStream.
Moved it to the factory method for creating Audio Streams
2013-08-04 13:32:22 -05:00
richiesams
071d9f2241 ZVISION: Add logic to allow the user to break out of videos 2013-08-04 13:32:21 -05:00
richiesams
92f3de72de ZVISION: Convert console sound handling to use new fileName decoding 2013-08-04 13:32:21 -05:00
richiesams
76f4d2b3d8 ZVISION: Create logic to decode sound rate and isStereo from fileName 2013-08-04 13:32:20 -05:00
richiesams
9f7ff84fe4 ZVISION: Create utility function to parse fileName from a full/partial path 2013-08-04 13:32:20 -05:00
richiesams
a30f49b556 ZVISION: Add a game type enum to detection
This is needed for sound file differentiation
2013-08-04 13:32:19 -05:00
richiesams
8de12fcbd2 ZVISION: Add underscore prefix to public static variable names 2013-08-04 13:32:19 -05:00
richiesams
644313e8f2 ZVISION: Add stereo/mono handling for Zork sound 2013-08-04 13:32:18 -05:00
richiesams
c45a13cdd7 ZVISION: Conform to GCC spacing for template inside template 2013-08-04 13:32:18 -05:00
richiesams
f88127104b ZVISION: Fix implicit conversion for scanf-type functions 2013-08-04 13:32:17 -05:00
richiesams
535d6a2a40 ZVISION: Modify RawZorkStream to use a modified ADPCM codec 2013-08-04 13:32:17 -05:00
richiesams
8d2bef2936 ZVISION: Create console command for loading sounds 2013-08-04 13:32:16 -05:00
richiesams
09358141de ZVISION: Allow the console to stay open when errors occur 2013-08-04 13:32:16 -05:00
richiesams
ae84e9508e ZVISION: Add 2x scaling to videos 2013-08-04 13:32:15 -05:00
richiesams
29061acd4e ZVISION: Add operator< to the Puzzle struct
ScriptManager does a unique-fication of a container of Puzzles using
a sort with some other logic. The sort uses operator<
2013-08-04 13:32:15 -05:00
richiesams
24dc3e1793 ZVISION: Create ScriptManager state handling logic 2013-08-04 13:32:14 -05:00
richiesams
9c7203c4b9 ZVISION: Create utility method to remove duplicate entries from a Common::Array 2013-08-04 13:32:14 -05:00
richiesams
78daaeb583 ZVISION: Create main containers in ScriptManager 2013-08-04 13:32:13 -05:00
richiesams
ba22c83861 ZVISION: Implement ActionTimer::execute() 2013-08-04 13:32:13 -05:00
richiesams
3397edb4f5 ZVISION: Add ActionNode class
This class encases actions that happen over time (timer, animations, etc)
Each frame, the engine calls process() on each active ActionNode
2013-08-04 13:32:12 -05:00
richiesams
d672c2c440 ZVISION: Remove unused methods from ZVision class 2013-08-04 13:32:12 -05:00
richiesams
9d478206f8 ZVISION: Move utility functions to a cpp file with declarations in a header file 2013-08-04 13:32:11 -05:00
richiesams
4e55d7ba94 ZVISION: Clean up includes 2013-08-04 13:32:10 -05:00
richiesams
61a2fffafd ZVISION: Standardize naming conventions to fit the rest of the code base 2013-08-04 13:32:10 -05:00
richiesams
0451503ecc ZVISION: Remove implicit cast between integer types 2013-08-04 13:32:09 -05:00
richiesams
4398c04a7b ZVISION: Create console command for loading a video 2013-08-04 13:32:09 -05:00
richiesams
76b2aa33ca ZVISION: Create/refactor methods for playing video.
The pixel format for videos is not the same as for the rest of the game.
(Game: RGB 555, Video: RGB 565)
2013-08-04 13:32:08 -05:00
richiesams
afbcca2187 ZVISION: Move engine width, height, and pixelFormat to const member variables 2013-08-04 13:32:08 -05:00
richiesams
4c7db7f5de ZVISION: renderImageToScreen: Check for TGZ first instead of TGA
TGA's aren't required to have a magic number in the header, but TGZ are.
Therefore it's easier to identify TGZ files.
2013-08-04 13:32:07 -05:00
richiesams
811ea39486 ZVISION: Update module.mk with current objs 2013-08-04 13:32:06 -05:00
richiesams
ec7915bcb9 ZVISION: Fix eos checking in LzssReadStream 2013-08-04 13:32:06 -05:00
richiesams
00c0284765 ZVISION: Conform to new eventRecorder code 2013-08-04 13:32:05 -05:00
richiesams
ca89f76798 ZVISION: Move early break out above the for loop. LzssReadStream::decompressBytes()
The other code would go through each of the for loops and do nothing due to EOS.
2013-08-04 13:32:05 -05:00
richiesams
399e512be2 ZVISION: Update renderImageToScreen to handle TGZ image files 2013-08-04 13:32:05 -05:00
richiesams
89693d4074 ZVISION: Create class for decompressing and reading LZSS 2013-08-04 13:32:04 -05:00
richiesams
fa365dffce ZVISION: Change #include scummsys.h to types.h 2013-08-04 13:32:04 -05:00
richiesams
a8e5e1e2db ZVISION: Rename result_action.h/.cpp files to actions.h/.cpp 2013-08-04 13:32:03 -05:00
Filippos Karapetis
258ecb0aeb ZVISION: Remove nonstandard C type declaration from the StateFlags enum 2013-08-04 13:32:03 -05:00
Filippos Karapetis
c882f79695 ZVISION: Remove direct inclusion of stdio.h 2013-08-04 13:32:02 -05:00
richiesams
540dde67db ZVISION: Cleanup dump method from run() 2013-08-04 13:32:02 -05:00
richiesams
46865dc394 ZVISION: Create renderImageToScreen method and add a console command for it 2013-08-04 13:32:01 -05:00
richiesams
4209236994 ZVISION: Create debug console and apply console logic to main loop 2013-08-04 13:32:01 -05:00
richiesams
a77ae2163b ZVISION: Add definitions for more ResultActions 2013-08-04 13:32:00 -05:00
richiesams
ebb546c468 ZVISION: Create utility method to dump result action signatures from various .scr files 2013-08-04 13:32:00 -05:00
richiesams
3f93f7d27f ZVISION: Change trimCommentsAndWhiteSpace to use a pointer instead of a reference. 2013-08-04 13:31:59 -05:00
richiesams
3822de2aec ZVISION: Change Puzzle::resultActions to a List of pointers instead of ResultAction objects
ResultAction is abstract, therefore, it can't be directly stored in the list
2013-08-04 13:31:59 -05:00
richiesams
0ba9ca8fa0 ZVISION: Forward declare ZVision in result_action.h
result_action.h is #included before ZVision is declared, causing not declared compiler errors
2013-08-04 13:31:58 -05:00
richiesams
16cc970c9e ZVISION: Normalize remaining CRLF to LF for the remote 2013-08-04 13:31:58 -05:00
richiesams
187c119e93 ZVISION: Create ResultAction 's for Add and Random.
Create class templates for PlayAnimation, PreloadAnimation, and Attenuate
2013-08-04 13:31:57 -05:00
richiesams
c0c4ee6533 ZVISION: Fix single_value_container.h include to use the new file name 2013-08-04 13:31:57 -05:00
richiesams
0b9dce40a0 ZVISION: Fix usage of Puzzle struct to use 'key' instead of 'id' 2013-08-04 13:31:56 -05:00
richiesams
1710468121 ZVISION: Fix includes to use new underscore names 2013-08-04 13:31:56 -05:00
richiesams
f99d613dcb ZVISION: Rename files to use underscores instead of camelCase 2013-08-04 13:31:55 -05:00
richiesams
daa2c4b670 ZVISION: Move test functions out of video.cpp and into their own file
The file only exist to hold the code. The actual tests will be
moved to an appropriate location later.
2013-08-04 13:31:55 -05:00
richiesams
7bc0097dde ZVISION: Fix include for singleValueContainer.cpp 2013-08-04 13:31:54 -05:00
richiesams
8d9f90bf12 ZVISION: Create ScriptManager accessor for ZVision
Having the ScriptManager as a member variable forced it to be const,
which prevented any non cont methods to be used. Thus, ScriptManager is
created on the heap and disposed after use.
2013-08-04 13:31:54 -05:00
richiesams
dec34c174b ZVISION: Create global state accessor/mutator methods for ScriptManager 2013-08-04 13:31:53 -05:00
richiesams
b70f85b9a0 ZVISION: Comment clarification for ScriptManager methods and helper structs 2013-08-04 13:31:53 -05:00
richiesams
464cc44a82 ZVISION: Convert ScriptManager methods to use ResultAction classes logic 2013-08-04 13:31:52 -05:00
richiesams
b3b7bd29b1 ZVISION: Create ResultAction base class and ActionAdd child class 2013-08-04 13:31:52 -05:00
richiesams
ac96b943fa ZVISION: Create an instance of ScriptManager inside ZVision 2013-08-04 13:31:51 -05:00
richiesams
526c1dc465 ZVISION: Use spaces in doxygen comments for alignement instead of tabs 2013-08-04 13:31:51 -05:00
richiesams
063d6c3400 ZVISION: Rename object.h and object.cpp to fit the new class name 2013-08-04 13:31:50 -05:00
richiesams
c3c7566962 ZVISION: Rename 'Object' class to 'SingleValueContainer' 2013-08-04 13:31:50 -05:00
richiesams
30208f7f2b ZVISION: Add documentation to 'Object' accessors 2013-08-04 13:31:49 -05:00
richiesams
5fef809941 ZVISION: Convert union of pointers to union of values except for String.
Instead of storing everything on the heap, only store Strings on the heap.
For Strings, store a char array pointer instead of an actual String object
since String objects are fairly large.
2013-08-04 13:31:49 -05:00
richiesams
d5fa6612ed ZVISION: Modify utility and puzzle comments to make them more clear 2013-08-04 13:31:48 -05:00
richiesams
3283176f6d ZVISION: Move initialization code from run() and into its own method 2013-08-04 13:31:48 -05:00
richiesams
7803c9fddf ZVISION: Force 'Object' constructors to be explicit. 2013-08-04 13:31:47 -05:00
richiesams
8cc678e2ee ZVISION: Convert 'Object' implicit conversion operators to accessors
Implicit conversion, while simple can cause problems and doesn't
show exactly how to get the value.
2013-08-04 13:31:47 -05:00
richiesams
cf7c04a001 ZVISION: Fix code formatting to follow the convention 2013-08-04 13:31:46 -05:00
richiesams
75e513c46c ZVISION: Create base puzzle parsing. 2013-08-04 13:31:46 -05:00
richiesams
8243263b33 ZVISION: Add documentation to utility functions and add a glorified trim function 2013-08-04 13:31:45 -05:00
richiesams
2ada5a8dd7 ZVISION: Split puzzleControl into two files. Add ResultAction enum
After further investigation, puzzles and controls don't really share any
structs. So it makes more sense to keep them seperate.
2013-08-04 13:31:45 -05:00
richiesams
f444a1fd38 ZVISION: Create Object class. 2013-08-04 13:31:44 -05:00
richiesams
a8980a4f77 ZVISION: Create utility function that writes File contents to another File
scr files are stored and encrypted in archive files. This is an easy
way to dump them for debugging purposes.
2013-08-04 13:31:44 -05:00
richiesams
160d6256f2 ZVISION: Create skeleton engine and move code away from Engine::Run
The goal is to have Engine::Run as clean as possible. Aka mostly method
calls.
2013-08-04 13:31:43 -05:00
richiesams
b65fd98441 ZVISION: Clean up includes 2013-08-04 13:31:43 -05:00
richiesams
ef37f14d53 ZVISION: Add xor encryption handling to ZfsArchive class 2013-08-04 13:31:42 -05:00
richiesams
179f5de498 ZVISION: Add support for ZFS archive files
ZfsArchive implements Common::Archive.
2013-08-04 13:31:42 -05:00
richiesams
8ae85892d6 ZVISION: Alter video handling to follow the new video audio track wrapper.
Commit 7a49802c01b0c39be4e86335689db8f3359fde68 created an audio track
hook that allows video decoding to use a differnt audio track encoding method

Also, re-normalize line endings
2013-08-04 13:31:41 -05:00
richiesams
5d64107ff3 ZVISION: normalized file endings 2013-08-04 13:31:40 -05:00
richiesams
0303850bf7 ZVISION: Allow detection to go off inner directory
Game detection needs to be off an actual resource, but all the resources
are in subdirectories. This updates the code to search for the specific
subdirectory.
2013-08-04 13:30:32 -05:00
richiesams
d0b341e6ca ZVISION: Create zvision bare structure
Add zvision base engine to engines/zvision as well as
modify the necessary engine files (configure.engines, etc.)
in order for it to be recognized.
2013-08-04 13:29:44 -05:00