Skip to content

Commit

Permalink
T: OH: naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHighFish committed May 3, 2015
1 parent cf26651 commit c8383be
Show file tree
Hide file tree
Showing 109 changed files with 615 additions and 640 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
v7.7.3 2015-04.xx
v7.7.3 2015-05.xx
==================
NEW STUFF:
- Added: Aggression frequency PT stats: "flop_afq" "turn_afq" "river_afq" "total_afq"
and "flop_float" (PT's stat name for: bet IP flop vs missed cbet)
Thanks to kata for the constructive suggestion.
[fqfq]
- A new Keyboard DLL for VmWare Unity Mode.
Thanks to BadHabit for the patch,
Termitapalahermita an Relhby for help and advice.
[THF]
- isrush now returns false for HU
[Wavelen]
- PT stats now update faster for rush/zoom tables and get reset on new hand
[Wavelen]
- New symbol isrush, especially meant to control flexible
heartbeat delays between fold and new game.
[THF]
- New chat messages, #20,#21 : \o/ , /o\
[fqfq]

- Implementing s$c0limitsX and r$c0limitsX for cazsinos
that need more then one regions to scrape the blinds from the table
(changing position and/or text).
Thanks to Ares for reporting such a casino.
[THF]

MAINTENANCE:
- Renaming many PT stats. Please see:
http://www.maxinmontreal.com/forums/viewtopic.php?f=302&t=18353&p=128623#p128623
[fqfq]
- Updated some validator-rules for the changed card-representations.
Thanks to Goran123 for reporeting and providing lots of screenshots.
[THF]

BUG FIXES:
- Various PT queries fixes.
Expand All @@ -37,12 +31,9 @@ BUG FIXES:
- Some board$-expressions like board$222 did not work.
Thanks to Chillit for reporting.
[THF]
- Absolute lines in the log-file were broken.
The parser used the line of the following function.
Thanks to OpenGeek for reporting.
- The lookup for some history-symbols didn't work.
Thanks to Djoca for showing us some validator errors.
[THF]
- PT thread sleeping times.
[fqfq]

v7.7.2 2015-04.01
==================
Expand Down
36 changes: 18 additions & 18 deletions CTransform/CTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ void CTransform::CalcHexmash(const int left, const int right, const int top, con
// bool *found_bbet=NULL, bool *found_ante=NULL, bool *found_limit=NULL,
// bool *founds_b_bb=NULL, bool *found_bb_BB=NULL
// to get a cleanner interface and cleaner code.
// The other in-out-parameters must be initialized with k_undefined now
// The other in-out-parameters must be initialized with kUndefined now
// (or with the empty string). This value represents the same information.
void CTransform::ParseStringBSL(const CString text,
const CString format,
Expand Down Expand Up @@ -982,44 +982,44 @@ void CTransform::ParseStringBSL(const CString text,
if (number_type == "^s") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^s (sblind)\t= " + temp + "\r\n");
if (sblind!=NULL && *sblind==k_undefined) {
if (sblind!=NULL && *sblind==kUndefined) {
*sblind = number;
}
} else if (number_type == "^b") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^b (bblind)\t= " + temp + "\r\n");
if (bblind!=NULL && *bblind==k_undefined) {
if (bblind!=NULL && *bblind==kUndefined) {
*bblind = number;
}
} else if (number_type == "^B") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^B (bbet)\t= " + temp + "\r\n");
if (bbet!=NULL && *bbet==k_undefined) {
if (bbet!=NULL && *bbet==kUndefined) {
*bbet = number;
}
} else if (number_type == "^a") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^a (ante)\t= " + temp + "\r\n");
if (ante!=NULL && *ante==k_undefined) {
if (ante!=NULL && *ante==kUndefined) {
*ante = number;
}
} else if (number_type == "^v") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^v (sb_bb)\t= " + temp + "\r\n");
if (sb_bb!=NULL && *sb_bb==k_undefined) {
if (sb_bb!=NULL && *sb_bb==kUndefined) {
*sb_bb = number;
}
} else if (number_type == "^V") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^V (bb_BB)\t= " + temp + "\r\n");
if (bb_BB!=NULL && *bb_BB==k_undefined) {
if (bb_BB!=NULL && *bb_BB==kUndefined) {
*bb_BB = number;
}
}
else if (number_type == "^y") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^y (buyin)\t= " + temp + "\r\n");
if (buyin!=NULL && *buyin==k_undefined) {
if (buyin!=NULL && *buyin==kUndefined) {
*buyin = number;
}
}
Expand Down Expand Up @@ -1079,72 +1079,72 @@ void CTransform::ParseStringBSL(const CString text,
|| text.Mid(place_in_text,8).MakeLower() == "no-limit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,8) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_NL;
}
place_in_text += 8;
} else if (text.Mid(place_in_text,7).MakeLower() == "nolimit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,7) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_NL;
}
place_in_text += 7;
} else if (text.Mid(place_in_text,2).MakeLower() == "nl") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,2) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_NL;
}
place_in_text += 2;
} else if (text.Mid(place_in_text,9).MakeLower() == "pot limit"
|| text.Mid(place_in_text,9).MakeLower() == "pot-limit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,9) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_PL;
}
place_in_text += 9;
} else if (text.Mid(place_in_text,8).MakeLower() == "potlimit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,8) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_PL;
}
place_in_text += 8;
} else if (text.Mid(place_in_text,2).MakeLower() == "pl") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,2) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_PL;
}
place_in_text += 2;
} else if (text.Mid(place_in_text,11).MakeLower() == "fixed limit"
|| text.Mid(place_in_text,11).MakeLower() == "fixed-limit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,11) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_FL;
}
place_in_text += 11;
} else if (text.Mid(place_in_text,10).MakeLower() == "fixedlimit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,10) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_FL;
}
place_in_text += 10;
} else if (text.Mid(place_in_text,2).MakeLower() == "fl") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,2) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_FL;
}
place_in_text += 2;
} else if (text.Mid(place_in_text,5).MakeLower() == "limit") {
assert (results_for_openscrape != NULL);
results_for_openscrape->Append("^L (limit type)\t= " + text.Mid(place_in_text,5) + "\r\n");
if (limit!=NULL && *limit==k_undefined) {
if (limit!=NULL && *limit==kUndefined) {
*limit = k_gametype_FL;
}
place_in_text += 5;
Expand Down
2 changes: 1 addition & 1 deletion CTransform/CTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CTransform
// bool *found_bbet=NULL, bool *found_ante=NULL, bool *found_limit=NULL,
// bool *found_sb_bb=NULL, bool *found_bb_BB=NULL
// to get a cleanner interface and cleaner code.
// The other in-out-parameters must be initialized with k_undefined now
// The other in-out-parameters must be initialized with kUndefined now
// (or with the empty string). This value represents the same information.
void CTransform::ParseStringBSL(const CString text,
const CString format,
Expand Down
12 changes: 6 additions & 6 deletions ManualMode-XMLRPC/ManualModeDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ char startup_path[MAX_PATH];
#define COLOR_YELLOW RGB(255,255,0)

// Table layouts
int cc[k_number_of_community_cards][2] =
int cc[kNumberOfCommunityCards][2] =
{ {-(CARDSIZEX*2 + 3*2 + CARDSIZEX/2), -(CARDSIZEY/2)}, // absolutes
{-(CARDSIZEX*1 + 3*1 + CARDSIZEX/2), -(CARDSIZEY/2)},
{-(CARDSIZEX*0 + 3*0 + CARDSIZEX/2), -(CARDSIZEY/2)},
Expand Down Expand Up @@ -555,7 +555,7 @@ END_MESSAGE_MAP()
// CManualModeDlg message handlers
void CManualModeDlg::clear_scrape_areas(void)
{
for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
card[CC0+i] = CARD_NOCARD;
}
Expand Down Expand Up @@ -738,7 +738,7 @@ void CManualModeDlg::OnPaint()
shift = 10;

// Draw common cards
for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
draw_card(card[CC0+i], cr.right/2 + cc[i][0] , cr.bottom/2 + cc[i][1], shift);
}
Expand Down Expand Up @@ -1993,7 +1993,7 @@ void CManualModeDlg::get_click_loc(CPoint p)
}

// see if we clicked on a common card
for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
if (p.x >= cr.right/2 + cc[i][0] &&
p.x <= cr.right/2 + cc[i][0] + CARDSIZEX &&
Expand Down Expand Up @@ -2803,7 +2803,7 @@ void CManualModeDlg::do_scrape_bets_into_pot(void)
{
int ncommoncards = 0;

for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
if (card[CC0+i]!=CARD_NOCARD && card[CC0+i]!=CARD_BACK)
{
Expand Down Expand Up @@ -2866,7 +2866,7 @@ int CManualModeDlg::get_br(void)
int br;
int ncommoncards = 0;

for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
if (card[CC0+i]!=CARD_NOCARD && card[CC0+i]!=CARD_BACK)
{
Expand Down
16 changes: 8 additions & 8 deletions ManualMode/ManualModeDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ char startup_path[MAX_PATH];
#define COLOR_YELLOW RGB(255,255,0)

// Table layouts
int cc[k_number_of_community_cards][2] =
int cc[kNumberOfCommunityCards][2] =
{ {-(CARDSIZEX*2 + 3*2 + CARDSIZEX/2), -(CARDSIZEY/2)}, // absolutes
{-(CARDSIZEX*1 + 3*1 + CARDSIZEX/2), -(CARDSIZEY/2)},
{-(CARDSIZEX*0 + 3*0 + CARDSIZEX/2), -(CARDSIZEY/2)},
Expand Down Expand Up @@ -284,7 +284,7 @@ END_MESSAGE_MAP()
// CManualModeDlg message handlers
void CManualModeDlg::clear_scrape_areas(void)
{
for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
card[CC0+i] = CARD_NOCARD;
}
Expand Down Expand Up @@ -453,7 +453,7 @@ void CManualModeDlg::OnPaint()
shift = 10;

// Draw common cards
for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
draw_card(card[CC0+i], cr.right/2 + cc[i][0] , cr.bottom/2 + cc[i][1], shift);
}
Expand Down Expand Up @@ -1642,7 +1642,7 @@ void CManualModeDlg::get_click_loc(CPoint p)
}

// see if we clicked on a common card
for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
if (p.x >= cr.right/2 + cc[i][0] &&
p.x <= cr.right/2 + cc[i][0] + CARDSIZEX &&
Expand Down Expand Up @@ -2337,7 +2337,7 @@ void CManualModeDlg::do_scrape_bets_into_pot(void)
{
int ncommoncards = 0;

for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
if (card[CC0+i]!=CARD_NOCARD && card[CC0+i]!=CARD_BACK)
{
Expand Down Expand Up @@ -2400,7 +2400,7 @@ int CManualModeDlg::get_br(void)
int br;
int ncommoncards = 0;

for (int i=0; i<k_number_of_community_cards; i++)
for (int i=0; i<kNumberOfCommunityCards; i++)
{
if (card[CC0+i]!=CARD_NOCARD && card[CC0+i]!=CARD_BACK)
{
Expand Down Expand Up @@ -2440,7 +2440,7 @@ int CManualModeDlg::Userchair()
return i;
}
}
return k_not_found;
return kNotFound;
}

bool CManualModeDlg::UserMaybeBigBlind()
Expand All @@ -2449,7 +2449,7 @@ bool CManualModeDlg::UserMaybeBigBlind()
}

bool CManualModeDlg::IsPreflop() {
for (int i=0; i<k_number_of_community_cards; i++) {
for (int i=0; i<kNumberOfCommunityCards; i++) {
if (card[CC0+i] != CARD_NOCARD) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion OpenHoldem/BringKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void CheckBringKeyboard(void) {
}

// Get state of keyboard menu item
if (keybd_item_pos == k_undefined) {
if (keybd_item_pos == kUndefined) {
return;
}
mii.cbSize = sizeof(MENUITEMINFO);
Expand Down
2 changes: 1 addition & 1 deletion OpenHoldem/CAutoConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ bool CAutoConnector::Connect(HWND targetHWnd) {
FailedToConnectBecauseNoWindowInList();
} else {
SelectedItem = SelectTableMapAndWindow(N);
if (SelectedItem == k_undefined) {
if (SelectedItem == kUndefined) {
FailedToConnectProbablyBecauseAllTablesAlreadyServed();
} else {
write_log(preferences.debug_autoconnector(), "[CAutoConnector] Window [%d] selected\n", g_tlist[SelectedItem].hwnd);
Expand Down
4 changes: 2 additions & 2 deletions OpenHoldem/CAutoplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ bool CAutoplayer::ExecuteBeep() {
}

bool CAutoplayer::ExecuteSecondaryFormulasIfNecessary() {
int executed_secondary_function = k_undefined;
int executed_secondary_function = kUndefined;
if (!AnySecondaryFormulaTrue()) {
write_log(preferences.debug_autoplayer(), "[AutoPlayer] All secondary formulas false.\n");
write_log(preferences.debug_autoplayer(), "[AutoPlayer] Nothing to do.\n");
Expand Down Expand Up @@ -348,7 +348,7 @@ bool CAutoplayer::ExecuteSecondaryFormulasIfNecessary() {
}
}
}
if (executed_secondary_function != k_undefined) {
if (executed_secondary_function != kUndefined) {
FinishActionSequenceIfNecessary();
p_autoplayer_trace->Print(ActionConstantNames(executed_secondary_function), false);
}
Expand Down
Loading

0 comments on commit c8383be

Please sign in to comment.