Skip to content

Commit

Permalink
refactor: removed unused code
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 714d5d91a6a20f770e6e1225359ad7ac7c415f73e90cfffe6db9502f52c155db
  • Loading branch information
thindil committed Oct 12, 2024
1 parent e687e6b commit cafffdd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 57 deletions.
5 changes: 0 additions & 5 deletions src/ui/baseslootui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,3 @@ proc addCommands*() {.raises: [], tags: [WriteIOEffect, TimeEffect].} =
addCommand("SortLootItems", sortLootItemsCommand)
except:
showError(message = "Can't add a Tcl command.")

# Temporary code for interfacing with Ada

proc getLootItemIndex(iIndex: cint) {.exportc.} =
itemIndex = iIndex
11 changes: 0 additions & 11 deletions src/ui/basesrecruitui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,3 @@ proc addCommands*() {.raises: [], tags: [WriteIOEffect, TimeEffect].} =
addCommand("ValidateNegotiate", validateNegotiateCommand)
except:
showError(message = "Can't add a Tcl command.")

# Temporary code for interfacing with Ada

proc getAdaHighestAttribute(baseIndex, memberIndex: cint): cstring {.exportc.} =
return getHighestAttribute(baseIndex = baseIndex, memberIndex = memberIndex - 1).cstring

proc getAdaHighestRecSkill(baseIndex, memberIndex: cint): cstring {.exportc.} =
return getHighestSkill(baseIndex = baseIndex, memberIndex = memberIndex - 1).cstring

proc getAdaRecruitIndex(): cint {.exportc.} =
return recruitIndex.cint + 1
8 changes: 0 additions & 8 deletions src/ui/basesschoolui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,3 @@ proc addCommands*() {.raises: [], tags: [WriteIOEffect, TimeEffect].} =
addCommand("UpdateSchoolSelectedCost", updateSchoolSelectedCostCommand)
except:
showError(message = "Can't add a Tcl command.")

# Temporary code for interfacing with Ada

proc getAdaMemberIndex(): cint {.raises: [], tags: [].} =
return getMemberIndex().cint + 1

proc getAdaSkillIndex(): cint {.raises: [], tags: [].} =
return getSkillIndex().cint
9 changes: 0 additions & 9 deletions src/ui/basesshipyardui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1474,12 +1474,3 @@ proc addCommands*() {.raises: [], tags: [WriteIOEffect, TimeEffect].} =
addCommand("CompareModules", compareModulesCommand)
except:
showError(message = "Can't add a Tcl command.")

# Temporary code for interfacing with Ada

proc setAdaModuleInfo(installing: cint; row: var cint;
newInfo, mIndex: cint) {.exportc.} =
moduleIndex = mIndex
var newRow = row.Positive
setModuleInfo(installing = installing == 1, row = newRow, newInfo = newInfo == 1)
row = newRow.cint
24 changes: 0 additions & 24 deletions src/ui/combatui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1133,27 +1133,3 @@ proc showCombatUi(newCombat: bool = true) =
updateCombatUi()
showCombatFrame(frameName = ".combat")
showScreen(newScreenName = "combatframe")

# Temporary code for interfacing with Ada

proc updateCombatAdaMessages() {.raises: [], tags: [], exportc.} =
updateCombatMessages()

proc updateAdaCombatUi() {.raises: [], tags: [WriteIOEffect, TimeEffect], exportc.} =
updateCombatUi()

proc showAdaCombatFrame(frameName: cstring) {.raises: [], tags: [], exportc.} =
showCombatFrame($frameName)

proc updateAdaBoardingUi() {.raises: [], tags: [], exportc.} =
try:
updateBoardingUi()
except:
echo getCurrentExceptionMsg()
echo getStackTrace(getCurrentException())

proc showAdaCombatUi(newCombat: cint) {.raises: [], tags: [RootEffect], exportc.} =
try:
showCombatUi(newCombat = newCombat == 1)
except:
discard

0 comments on commit cafffdd

Please sign in to comment.