how to compile NullpoMino code?

Started by Integration, September 13, 2012, 11:01:19 AM

Previous topic - Next topic

Integration

I have problems to focus on my previews and still see my stack in the corner of my eye. I only succeed, when my stack is high. So I'd like to move the previews down like in this picture:



Problem is, that you have to change the source code in order to do that. I think, I have found the class, I'd have to change. I assume, it is RendererSlick.java in the folder NullpoMino\src\mu\nu\nullpo\gui\slick. I'd move the previews 68 pixels down, but only if the previews are displayed on side(big) and are less than 5 pieces, and matrix is 320 pixel high.

public void renderFirst(GameEngine engine, int playerID) {
// ...
// drawNext(offsetX, offsetY, engine) replaced by this:
if ( getNextDisplayType() == 2 && engine.ruleopt.nextDisplay < 5 && engine.displaysize == 0 )
    drawNext(offsetX, offsetY + 68, engine);
else
    drawNext(offsetX, offsetY, engine);

But I don't know how to compile. Honestly, I have not much programming knowledge. So I'd be very grateful for some help. Can somebody teach me, how to do that, or do it oneself (,if it's too complicated to explain or if external programs are required)? And what happens, when you successfully compile? Do you get a new version of slick.jar, which you have to place in the folder NullpoMino\lib, such that it is used by NullpoMino.exe?

bigwig

#1
I have no idea how anyone is supposed to figure this out on their own, but after bugging Wojtek enough times he graciously explained to me
1. copy nullpomino to your workspace or checkout it from svn

2. run eclipse, then file -> new java project, type name that match your folder name of nullpomino project in your workspace

3. click finish, eclipse will import project

4. in project properties change jre version to 1.5

5. in reference libarary for project, go to slick.jar properties and set native library dir to nullpomino/lib

6. click run, choose application

7. choose NullpoMinoSlick as main class

8. nullpomino compiled by you should start

Integration

bigwig 4 PNG*      

A thousand thanks, it worked perfectly. I feel like being a pro hacker now   . Nah, not really. I waited one day, because it looked complicated. But I could easily follow your steps (,although I didn't know, what I did there). Now let's see, what I can do with 3 previews.

* PNG = Pretty Nice Guys