what do i have to do to get access to Onlink's source code?
I tried asking Miah in PM, but no response (he hasn't even read it, according to the forum, and it was a week ago)
why do i want access? :
Onlink, in its current 0.2.5.x beta, has over 9000 bugs (well, enough bugs to be annoying),
and whenever i encounter a particularly annoying bug (perhaps even a game-breaking bug), i probably have a few options like:
- ignore/avoid it until next release
- stop playing until next release
- Debug and patch the (compiled) game, fixing the problem
the last option is interesting, fixing problems in programs WITHOUT the source code, is (usually) A LOT harder and takes way more time, than fixing the problem in the source code, also, the effort is usually lost upon next release of the program, as the structure of the program change (since there's no API for this stuff, mostly, the memory addresses change, and when new variables are introduced in functions, the cpu registers used change, and the relative position of stuff on the stack change, so much needs to be updated to keep an assembly patch up-to-date), while a source code fix is more like a permanent fix, following into future versions of the program ~~
i would love to be able to fix problems in the source code, it should be much easier and faster for me, then i could just send the source fix back to a onlink developer, recompile it for myself, and keep playing... i need the source code for that.
just for fun, lets compare a assembly (no source) fix, with a c++ (source available) fix:
Problem: buying shares while not having enough money to actually buy the shares, will mess up the tradeShares function, leaving you with 0 money and 0 shares
Let's fix it by making the tradeShares function check if you have enough money, before actually doing anything.
C++ fix:
Code:
if(sharesToTrade>0){
//we are BUYING shares.
if(targetCompany->GetSharePrice()*sharesToTrade > buyer->GetBalance()){
return false;//shit, we do not have enough money. do nothing
}
}
that's the source code c++ fix. seems pretty easy, right?
Now lets do that without the source code, writing the assembly directly:
Code:
;sharesToTrade is in dword ptr [ebp+0C]
;target company is in ESI
;buyer person is in EDI
PUSHAD
cmp dword ptr [ebp+0C],0
jl EnoughMoney
;we are BUYING shares.
PUSH -1
MOV ECX,ESI
CALL Company::GetSharePrice
MOV ESI,EAX
MOV EBX, dword ptr [ebp+0C]
IMUL ESI,EBX
MOV ECX,EDI
CALL Person::GetBalance
CMP EAX,ESI
JL SHORT NotEnoughMoney
EnoughMoney:
POPAD
JMP 004C2D68
NotEnoughMoney:
;shit, we don't have enough money. do nothing.
POPAD
JMP 004C2E5E
now, if you think the assembly fix looks about as easy as the c++ fix, ...you're much better at assembly than i am