ViewVC Help
View Directory | Revision Log | View Changeset | Root Listing
root/src/trunk/games
Revision 1153 - Directory Listing - [select for diffs]
Modified Wed Aug 8 02:27:19 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1152
Forced commit to add:

 The changes in the randomize_fd.c are pretty simple: Basically in the older algorithm you had to
walk thru the whole list element-by-element in order to reach an specific line and print it. This
process is rather slow in big lists (big files :)), since it had to go all the way from the head
of the list until it reached the element it randomly selected.
 The new algorithm only changes the way we access the elements, basically after the whole file is
loaded up into the linked-list, we create an array of pointers to rand_node pointers, basically we
walk over the whole list once (after the whole file is loaded into the list) and map each address
into an array position (in the same order they were inserted on the list), after that whenever a
random number is selected, we dont need to walk the whole list until we reach it, we simply
rand_node_table[selected] it and get it in one move.
 If the unique option is used, after a rand_node_table[selected] gets visited we set it to NULL
and if we reach that same slot afterwards, we simply go back and randomly select another number.
 Pretty simple.

 victor loureiro lima

Revision 1152 - Directory Listing - [select for diffs]
Modified Wed Aug 8 02:20:32 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1149
Add submitted patch that has been sitting in my inbox for over six months.

Revision 1149 - Directory Listing - [select for diffs]
Modified Tue Aug 7 06:16:23 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1056
Fix a tagging goof

Revision 1056 - Directory Listing - [select for diffs]
Modified Thu Jul 19 07:54:18 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1054
Undo some of the damage from our "helpful" script

Revision 1054 - Directory Listing - [select for diffs]
Modified Thu Jul 19 04:54:07 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1043
Correct bug in script adding $MidnightBSD$

Revision 1043 - Directory Listing - [select for diffs]
Modified Tue Jul 17 10:36:11 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1042
$MidnightBSD$

Revision 1042 - Directory Listing - [select for diffs]
Modified Tue Jul 17 10:25:13 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1041
$MidnightBSD$

Revision 1041 - Directory Listing - [select for diffs]
Modified Tue Jul 17 10:11:11 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1040
$MidnightBSD$

Revision 1040 - Directory Listing - [select for diffs]
Modified Tue Jul 17 09:48:29 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 1039
$MidnightBSD$

Revision 1039 - Directory Listing - [select for diffs]
Modified Tue Jul 17 09:25:07 2007 UTC (16 years, 9 months ago) by laffer1
Diff to previous 6
$MidnightBSD$

Revision 6 - Directory Listing - [select for diffs]
Modified Sat Feb 25 02:38:42 2006 UTC (18 years, 2 months ago) by laffer1
Diff to previous 3
This commit was generated by cvs2svn to compensate for changes in r5, which
included commits to RCS files with non-trunk default branches.
Revision 3 - Directory Listing - [select for diffs]
Added Sat Feb 25 02:29:52 2006 UTC (18 years, 2 months ago) by laffer1
This commit was generated by cvs2svn to compensate for changes in r2, which
included commits to RCS files with non-trunk default branches.

Convenience Links