Skip to content

Commit

Permalink
Merge branch 'master' into farming-contracts-infobox-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyborger1 authored Dec 8, 2024
2 parents 4c1bfaa + 210c0c3 commit 1160e71
Show file tree
Hide file tree
Showing 798 changed files with 35,231 additions and 12,770 deletions.
18 changes: 8 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Contributing to runelite
# Contributing to RuneLite

We'd love for you to contribute to our source code and to make runelite even better than it is
We'd love for you to contribute to our source code and to make RuneLite even better than it is
today!

Check out the Developer's Guide on the [wiki](https://github.com/runelite/runelite/wiki) for setup instructions, and general tips and tricks.
Check out the [Developer Guide](https://github.com/runelite/runelite/wiki/Developer-Guide) for setup instructions, and general tips and tricks.

If you want to make or contribute to a plugin hub plugin, this is *not* the correct guide; instead read the plugin hub development guide, which is linked from the developer guide.

Here are the guidelines we'd like you to follow:

Expand All @@ -14,12 +16,12 @@ Here are the guidelines we'd like you to follow:

## <a name="question"></a> Got a Question or Problem?

If you have questions about how to contribute to runelite, please join our [Discord](https://discord.gg/ArdAhnN) server.
If you have questions about how to contribute to RuneLite, please join our [Discord](https://runelite.net/discord) server.

## <a name="issue"></a> Found an Issue?

If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request
submitting an issue to our [GitHub Repository](https://github.com/runelite/runelite). Even better you can submit a Pull Request
with a fix.

**Please see the [Submission Guidelines](#submit) below.**
Expand Down Expand Up @@ -84,7 +86,7 @@ In GitHub, send a pull request to `runelite:master`.
If we suggest changes, then:

* Make the required updates.
* Re-run runelite and make sure any and all tests are still passing.
* Re-run RuneLite and make sure any and all tests are still passing.
* Commit your changes to your branch (e.g. `my-fix-branch`).
* Push the changes to your GitHub repository (this will update your Pull Request).

Expand Down Expand Up @@ -130,7 +132,3 @@ from the main (upstream) repository:
## <a name="format"></a> Coding Format
To ensure consistency throughout the source code, review our [code conventions](https://github.com/runelite/runelite/wiki/Code-Conventions).
[github]: https://github.com/runelite/runelite
[discord]: https://discord.gg/ArdAhnN
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body:
- Confirm your issue happens in safe mode (with the exception of GPU-plugin related issues).
- Search for your issue in both [the issue listing](https://github.com/runelite/runelite/issues) and the [Q&A discussion listing](https://github.com/runelite/runelite/discussions/categories/q-a). If you find that it already exists, respond with a reaction or add any further information that may be helpful.
We do not accept bug reports for 3rd party/pluginhub plugins. Confirm your issue is not caused by a 3rd party plugin by running RuneLite in safe mode via `"%localappdata%\RuneLite\RuneLite.exe" --safe-mode`.
We do not accept bug reports for 3rd party/pluginhub plugins. Confirm your issue is not caused by a 3rd party plugin by running RuneLite in [safe mode](https://github.com/runelite/runelite/wiki/FAQ#how-do-i-run-runelite-in-safe-mode).
- type: dropdown
attributes:
label: Type
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ jobs:
build:
runs-on: ubuntu-20.04

permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.m2/repository
Expand All @@ -21,7 +26,7 @@ jobs:
${{ runner.os }}-cache-
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RuneLite is a free, open source OldSchool RuneScape client.

If you have any questions, please join our IRC channel on [irc.rizon.net #runelite](http://qchat.rizon.net/?channels=runelite&uio=d4) or alternatively our [Discord](https://discord.gg/ArdAhnN) server.
If you have any questions, please join our IRC channel on [irc.rizon.net #runelite](http://qchat.rizon.net/?channels=runelite&uio=d4) or alternatively our [Discord](https://runelite.net/discord) server.

## Project Layout

Expand Down
2 changes: 1 addition & 1 deletion cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.21-SNAPSHOT</version>
<version>1.10.46-SNAPSHOT</version>
</parent>

<artifactId>cache</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ instruction_name: name_string | name_opcode ;
name_string: IDENTIFIER ;
name_opcode: INT ;

instruction_operand: operand_int | operand_qstring | operand_label | ;
instruction_operand: operand_int | operand_qstring | operand_label | operand_symbol | ;
operand_int: INT ;
operand_qstring: QSTRING ;
operand_label: IDENTIFIER ;
operand_symbol: SYMBOL ;

switch_lookup: switch_key ':' switch_value ;
switch_key: INT ;
Expand All @@ -61,6 +62,7 @@ NEWLINE: ( '\r' | '\n' )+ ;
INT: '-'? [0-9]+ ;
QSTRING: '"' (~('"' | '\\' | '\r' | '\n') | '\\' ('"' | '\\'))* '"' ;
IDENTIFIER: [a-zA-Z0-9_]+ ;
SYMBOL: ':' [a-zA-Z0-9_:]+ ;
COMMENT: ';' ~( '\r' | '\n' )* -> channel(HIDDEN) ;

WS: (' ' | '\t')+ -> channel(HIDDEN) ;
75 changes: 75 additions & 0 deletions cache/src/main/java/net/runelite/cache/FontManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2024, Christopher Brown <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.cache;

import net.runelite.cache.definitions.FontDefinition;
import net.runelite.cache.definitions.loaders.FontLoader;
import net.runelite.cache.fs.Archive;
import net.runelite.cache.fs.FSFile;
import net.runelite.cache.fs.Index;
import net.runelite.cache.fs.Storage;
import net.runelite.cache.fs.Store;
import net.runelite.cache.util.Djb2;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class FontManager
{
private final Store store;
private final Map<Integer, FontDefinition> fonts = new HashMap<>();

public FontManager(Store store)
{
this.store = store;
}

public void load() throws IOException
{
Storage storage = store.getStorage();
Index index = store.getIndex(IndexType.FONTS);
FontLoader fontLoader = new FontLoader();

for (Archive archive : index.getArchives())
{
byte[] data = storage.loadArchive(archive);
FSFile file = archive.getFiles(data).getFiles().get(0);
FontDefinition fontDefinition = fontLoader.load(file.getContents());

fonts.put(archive.getNameHash(), fontDefinition);
}
}

public FontDefinition getFont(int nameHash)
{
return fonts.get(nameHash);
}

public FontDefinition findFontByName(String name)
{
int nameHash = Djb2.hash(name);
return this.getFont(nameHash);
}
}
47 changes: 47 additions & 0 deletions cache/src/main/java/net/runelite/cache/FontName.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2024, Christopher Brown <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.cache;

public enum FontName
{
PLAIN_11("p11_full"),
PLAIN_12("p12_full"),
BOLD_12("b12_full"),
VERDANA_11("verdana_11pt_regular"),
VERDANA_13("verdana_13pt_regular"),
VERDANA_15("verdana_15pt_regular");

private String name;

FontName(String name)
{
this.name = name;
}

public String getName()
{
return this.name;
}
}
1 change: 0 additions & 1 deletion cache/src/main/java/net/runelite/cache/IndexType.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public enum IndexType
FONTS(13),
MUSIC_SAMPLES(14),
MUSIC_PATCHES(15),
WORLDMAP_OLD(16), // looks unused
WORLDMAP_GEOGRAPHY(18),
WORLDMAP(19),
WORLDMAP_GROUND(20),
Expand Down
Loading

0 comments on commit 1160e71

Please sign in to comment.