Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
0af61ef
Updated all functions in autogenerate.c to use calloc() instead of ma…
bryan22lee May 18, 2020
0defb44
created CMakeLists.txt file for tests/openworld/ and also updated dep…
bryan22lee May 19, 2020
2df1a1f
Added test for test_autogenerate.c, but need source code for gen_stru…
bryan22lee May 20, 2020
2d96711
Revamping items and rooms module
May 20, 2020
517603d
Rooms and items compile
May 20, 2020
99feb79
Added items modules tests
May 21, 2020
0653c1d
Adding tests for sample_rooms and sample_items
May 21, 2020
65113b9
bogus commit
May 21, 2020
ce6da7f
Tests are passing for sample_rooms and sample_itemsgit status So fun!…
May 21, 2020
e57b30a
Revamped items struct per Dawson's instructions
May 21, 2020
738e3f0
New items module passes all tests
May 21, 2020
6da7f68
Revamping rooms module
May 21, 2020
f68d407
Fixed sample_room module tests. All tests pass!
May 21, 2020
2699338
create sample_npc.h with struct and functions
navila-luna May 21, 2020
d31c606
Merge conflicts need to be resolved, trying to pull gen-structs
May 23, 2020
f75e7be
Restructured items and rooms module,again. Referencing room spec!
May 23, 2020
8e6b9bc
Working out minor bugs and issues relating to compiling
May 23, 2020
b0ae070
Delete sample_npc.h
navila-luna May 23, 2020
8daae59
Added make_default_item() to items module
May 23, 2020
a1c85e2
Working out more bugs. Switched to LL functions
May 23, 2020
c724b09
Refactored make_default_items
May 23, 2020
6536ab3
Fixed compile issues for items and rooms
May 23, 2020
3de2cc7
Fixed item modules tests
May 23, 2020
186e48e
Items module passes all tests
May 23, 2020
a7620d1
Fixing room module tests
May 23, 2020
8e7318b
Forgot to change function names in room module
May 23, 2020
d2f1f94
Fixed function names in room module
May 23, 2020
f4c0cca
Rooms module is passing tests
May 23, 2020
92d583d
added sample_npc.h and .c.
May 24, 2020
bb4dd9f
added sample_npc.h and .c.
May 24, 2020
2e2ee20
Minor edits for clarity
May 24, 2020
43ad9c9
Merge branch 'openworld/sample-generation' of https://github.com/uchi…
May 24, 2020
b9db41c
Trying a new double dimensional array arrangement
May 24, 2020
e76d240
Revert "Trying a new double dimensional array arrangement"
May 24, 2020
daa84ac
Revert "Minor edits for clarity"
May 24, 2020
cccb190
help me stash errors??
May 24, 2020
53bbfc2
Reverting back to passing tests state. Up next: cleaning up the code …
May 24, 2020
915ef49
Reverteing back to passing tests. Will work on optimizing code before…
May 24, 2020
e7eec20
Back to square one. Final edits coming
May 24, 2020
eba7b40
Renamed files to default
May 24, 2020
cf8db8c
Minor refactoring
May 24, 2020
93d710a
Finished reformatting, now onto tests
May 24, 2020
f899fe1
Fixed syntax errors.
May 24, 2020
d316418
Implemented hash table in items module
May 24, 2020
c1f66e0
Late night fixes ... hashes
May 24, 2020
ebb3827
Refactored make_default_item() into make_default_room
May 24, 2020
2510bc4
Need to fix HASH_FIND_STR return
May 24, 2020
10bf5fe
Added items tests
May 24, 2020
9360434
Pointer trouble
May 24, 2020
ba9cd3d
Added item definitions to get_default_items()
May 24, 2020
1f5ae09
Items module done. Tests passing.
May 24, 2020
3885444
fixing room modules pointers in hash structures
May 24, 2020
4ba259c
Refactored get_allowed_rooms()
May 24, 2020
ec505fc
Fixing room module tests
May 24, 2020
e48428f
Changed descriptions on rooms
May 24, 2020
d9ff91a
Completed writing tests for rooms/items module
May 24, 2020
bd105e9
Fixed comments in default_rooms per Nicole's instructions
May 24, 2020
2aa9fd1
Merge branch 'dev' into openworld/default
carolinaecalderon May 24, 2020
9061c53
Fixed build errors from merging CMakeLists.txt
May 25, 2020
9ed45f6
Fixed formatting to match chiventure standards
May 25, 2020
2f14ed0
Fixed compile errors from changing formatting
May 25, 2020
ffd8797
Changed header formatting for default_rooms
May 25, 2020
c615c97
Merge branch 'openworld/default' of https://github.com/uchicago-cs/ch…
May 25, 2020
f83c86c
Changed header formatting for default_rooms
May 25, 2020
e9aeef9
Removed commented text in CMakeLists.txt
May 25, 2020
f07c781
pulled Eddy's PR request
May 25, 2020
26a6007
Fixed rooms module to add new gen_struct updates from Eddy's PR
May 25, 2020
f409257
Additional PR changes compile now, but tests for default_room do not …
May 25, 2020
5654d00
Implementing deep copy in default_rooms
May 25, 2020
589bf23
passing all tests temporarily. need to revisit default_rooms and why …
May 25, 2020
2e04072
ALL TESTS PASS HALLELUJAH
May 26, 2020
1da5f49
Fixed merge conflict in CMakeLists.txt (had to include custom-actions)
May 26, 2020
bd8cf62
Gave tmp hashtables NULL value
dwahme May 26, 2020
8e25b73
Merge branch 'dev' into openworld/default
dwahme May 26, 2020
444c9e4
Final PR edits
May 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ find_package(Curses REQUIRED)

set(CHIVENTURE_MODULES action_management battle checkpointing cli common custom-actions game-state libobj npc openworld playerclass skilltrees ui wdl)


include_directories(include/)

add_subdirectory(src/action_management)
Expand Down
14 changes: 14 additions & 0 deletions include/openworld/default_items.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef _DEFAULT_ITEM_H
#define _DEFAULT_ITEM_H

#include "common/uthash.h"
#include "default_items.h"
#include "game-state/game_state_common.h"
#include "game-state/item.h"

/*get_default_items() returns all the default defined
* items in a hash table.
*/
item_hash_t *get_default_items();

#endif /* _DEFAULT_ITEM_H */
36 changes: 36 additions & 0 deletions include/openworld/default_rooms.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#ifndef _DEFAULT_ROOM_H
#define _DEFAULT_ROOM_H

#include "default_items.h"
#include "game-state/game_state_common.h"
#include "game-state/room.h"
#include "gen_structs.h"

/* copy_item_to_hash is a helper function to deep copy
* items from the src hash to the dest hash using name
* as the key for lookup.
* Input:
* - item_hash_t *dst, *src: the source and destination hash tables
* - char *name: the key for look up
* Output: SUCCESS or FAILURE
*/
int copy_item_to_hash(item_hash_t **dst, item_hash_t *src, char *name);


/*make_default_rooms adds all the defined default rooms+items for a themed
* "bucket" (a name for a group of related rooms). In the case where the
* "bucket" IS NOT part of the default definitions, there are optional
* parameters for a short_desc, long_desc that will be used to define a
* new roomspec. In future springs, the npc struct will be added.
*
* Input:
* - char *bucket: the string identifier for the theme of the set of rooms
Comment thread
carolinaecalderon marked this conversation as resolved.
* char **sh_desc: optional , unless "bucket" IS NOT default defn, use as a room short_desc.
* - char *l_desc: similar purpose to sh_desc but for long_desc
*
* Output:
* - roomspec_t updated hash
*/
roomspec_t *make_default_room(char *bucket, char *sh_desc, char *l_desc);

#endif /* _DEFAULT_ROOM_H */
Loading